If you’re on IOS, the Focus feature is great. I use it primarily for sleep to turn off all notifications except for calls (in case of emergencies). But you can basically configure multiple profiles with different notification settings. Also, whenever I install a new app on my phone, I turn notifications off unless it’s a time sensitive app like a messaging app.