On Android/Graphene, I recommend permanently turning on do not disturb and adding apps to the allowlist. Opt in to notifications, rather than opting out.
That's opting out of notificationse which is subtly different. I'm advocating for something a little different. See if your mind feels less scattered if you don't have any notifications at all. Then allow back in the ones that you feel are essential. A lot of the notifications we get feel important, but aren't.