For me though, it's fairly straightforward:
- Decide what I need to work on, and try to visualize the end result as clearly as possible
- Put phone on DND
- Turn off email clients
- Close browser tabs not related to work
- Put on noise-canceling headphones with some music that has no lyrics (e.g. electronic, synthwave, etc.)
Then I work.
I can stay in "the zone" for many hours using this method, and tend to accomplish my best work. Furthermore, I can do it uninterrupted, except for the occasional 5-minute restroom break.