One formulation I like is the Kethledge and Erwin definition of solitude. They say that solitude is not so much physical isolation as it is a lack of input from other minds. What electronic media do (among many other effects) is flood your consciousness with the presence of other minds. Even if that mind is deranged, anti-social, or even pleasant, your own thought gets crowded out. I'm a huge reader, and I realize even books do this, although less oppressively than electronic media, which is why I think people imagine them as antidotes to this problem. But I think maybe the most important thing is to take a rest and don't let anyone else talk to you for a time, either in person or via media.
In fact, doing this might be even worse than just doomscrolling, given that all you’re doing is massaging your own ego while doing absolutely nothing in favour of actualising what you are preaching.
I was working as a line cook and trying to find time and energy to code study so I could land a role in software (no degree). I was really struggling with my mental health and was having issues making or maintaining progress in pretty much any area of my life.
I got a new job, cooking breakfast in a small mountain town at a bakery. Before I left I sold my laptop and borrowed a bunch of books from some friends.
I really did feel much better a few months later. Taking the time to decompress allowed me to get my priorities in order and surface some biases / blind spots I had. I ended up re-enrolling in school the next spring and am now happily employed in software.
I don’t think the modality is particularly important - coding vs reading vs anything else - but taking the time to put your goals away for a little while and decompress can make you more effective in actually reaching them