pull down to refresh

While there are many great answers already, I'd love to add my 2 sats.
If you're looking for a silver bullet, I'm afraid there is none. Consistency is key; having a clearly defined goal helps; having a plan helps. But there will be days where you are not as productive as you'd like to be, and that's okay too.
Personally, I've found that when coding and writing, my productivity diminishes drastically after 3-4 hours. So I try to structure my days around that productivity time. Having a good breakfast is usually good, but I sometimes skip it. I use tools to fight off distractions (LeechBlock, app timers, distraction-free editors for both code and words) and use a Pomodoro timer if I feel like taking brakes. (Sometimes I'm obsessed and not in the mood for brakes.)
I try to do as much work outside as I can, going on walks or for a run to listen to podcasts and articles (Read Aloud is okay, Pocket's TTS engine is okay too, Guy Swann is best), or going to the gym - preferably outdoors too.
I spend time with the family when taking breaks or when braindead, usually a couple of hours in the evenings. At night I try to read or do stuff that doesn't need too much brain power, e.g. shitposting, answering DMs and emails and the like.
One day a week is 100% family time, sometimes two. Again, consistency is key. Make plans and stick to them, even if it is just "we will go to park XY on Saturday to take a walk for an hour."
If I could only pass on one piece of advice it would be this: make peace with the fact that your TODO list will never be empty, that it will probably grow faster than you can ever tick items off. In other words: the work will never end, no matter if it's self-imposed, consisting of things you really want to do, or imposed by others, i.e. things you have to do for your job. Once you make peace with that fact you will realize that all you can do is prioritize and execute.
Chop wood, carry water. Be present. Do your best every day and don't forget to enjoy it.