I think in the long run, maintaining a productivity pace is more about habits and space and less about specific tricks.
For me, I do almost the same things every day: waking at the same hour most of the time (around 06:00 or 06:30), drinking a cup of coffee while planning the day.
I also do my work mostly in the same space in the house, at my desk: when I sit in the chair, I immediately start working. It helps a lot to have an excellent and curated todo list, action-oriented so that I can start working directly without too much time to think about other things.
Some other small things I do:
1. I use one account on my Mac for work and another one for personal/leisure.
2. I mostly use the computer for work. I don't play games on it, and I almost don't use social media on the computer (for this and for other things like reading books or posts, I mostly use an iPad).
3. I use a Pomodoro app to start working. I just open it when I sit on the chair and add the first task I want to focus on. But after 1/2 pomodoros, I drift off it and continue focusing.
4. It also helps me put on my headphones even if sometimes I don't listen to the music. But I think this is a habit of focusing from when I was working years ago in an open-space or in coffee shops.
5. I use multiple keyboards some days: I have three external keyboards on my desk, and when I feel I am losing focus and I need to maintain it, I change the keyboard. It gives me a similar feeling like using a good pen to draw something or to write a good text on a piece of paper and just want to continue using it :)