For this, there is a system-wide 'do not disturb' mode.
It is actually shocking to me that some people have this extremely narrow view of this problem. There are huge classes of applications that absolutely require immediate notification of the user, but here people just handwaive this as a non-issue because "I don't like to be disturbed".
How about a doctor called for an operation? Your car being robbed? Incoming bank payment? New ride request for a taxi driver? Disaster notification? VoIP call? A soccer game beginning? Billions of uses you just discard because you don't want it. Gross.