A partial solution is to turn off all notifications, re-enable them for anything absolutely vital, consider putting in healthy time or location locks using automation software like
e-robot as the excellent old tool Llama Location Profiles no longer seems to exist, or
automate, unfortunately I think Do Not Disturb is still the only (lacklustre) option for iOS.
Not everyone by a long shot, but a lot of people struggle because they either don't explore the notification options, or aren't aggressive enough with what they shut out.
You still have to find a way to exercise restraint/fight procrastination/addiction and not keep picking up a device to check mail/media manually, but it's a lot easier when not being nagged.