How to turn off notifications in iOS and iPadOS

How to stop your iPhone or iPad from distracting you with endless notifications.