I would add that if you truly want to distract yourself, ‘no notifications’ policy doesn’t work. You may just open your distraction and update it manually, expecting for the notification to arrive. Even when you set it to never bother you. So, the best way is to explore what triggers you to distract in the first place.
I don’t mean turning off the notifications isn’t going to work. It would, and I highly recommend turning off everything, but the urgent stuff. You’ll notice you won’t miss what you truly need anyway. And you still may distract yourself, when you want it.