For some tasks i use the pomodoro clock, it is 25 minutes of undesturbed work followed by 5 minute breaks where you can do something.
Make sure you work with alarms so you don’t miss your start and stop sign. Work in blocks of 3/4 and take a longer break. Because you know there is a break coming you are not going to dwell on your phone:)
I think to stop procrastinating in my own personal capacity would be mind control