When I go to bed, I plug it away from the bed so that I won’t be tempted to get up and look at it while I’m lying down. When I have a good amount of work, I put it on silent mode, and put it face down on the table. I figured that for any emergencies, my family will call me, and their calls will get thru because of the emergency bypass feature on my phone, wherein the phone will still ring whenever certain people will call.
I’ve switched off all sounds except alarm clocks. It vibrates on people calling me, other than that there are only silent notifications. I turn it upside down, leave it in another room or use the app Forest to resist the urge when I’m really easily distracted.
I turn on some music or an audiobook, listen with earbuds, and keep my phone in my pocket as I focus on the task at hand, never pulling it out to check notifications because I'm too absorbed in whatever else I'm doing at the moment.
At work, I leave my phone at home or in the car. I use screentime to shut off my apps at night. Sometimes I give ny phone away to a friend to make sure I don’t use it, or even so far away from me in the house it would be a pain to go get it.
Turn off notifications, also turn off network when possible. Delete social media apps. Put the phone screen down where you can’t see it.
Sorry, but I am not attached to my phone as many others. But it helps to install a checker that register how long you have been occupied with a certain app. In my case it is mostly Fabulous 😉
I always put my phone on airplane mode in the middle of a deep work session. Once the timer runs out, I give myself 5 minutes to check notifications, take a break etc before starting another deep work session.