I'm terrible at this but I have some coping strategies, for the lack of a better word. I've also build tools to help me with this as I have personal interest in mental health. Listing them here in case you'd find them useful, as some other people have:
1. no news or HN in the morning. I could stop just here. Instead I meditate for 10-20 minutes and write using an app I built for myself (https://enso.sonnet.io). The point is to just process the previous day without editing yourself, hence the very limited UX it has.
2. I also made Sit. (https://sit.sonnet.io), with the goal of: "please share with a friend who needs to sit the fuck down or enjoy the experience yourself."
It's just a timer with a more gentle snooze function, nothing special, but also an excuse to tell people to spend more time doing nothing, instead of consuming.
That's 20-30m of my morning. It's not that much I think. I am by no means an organised person and a skip those habits on my worse days. It's just so much better than letting someone put random shit in your head every morning.
3. I try to avoid chatting on HN or Twitter and meet people using my "office ours" (https://sonnet.io/posts/hi) where anyone can just call me to chat, pair program or rant. Feel free to come and say hi!
4. I doodle in bed before falling asleep. The worse my doodles are the better. I put some of them on https://potato.horse
I guess my point is that when I'm not sucked into YT it gets much easier to get stuff done. What helps me is just trying to do some of these things in a slightly shoddy way, so I don't obsess about getting them perfect.
This feels my head with something better than noise which often is just there to dull a sense of anxiety. Hope some of that will be useful.
PS I'm writing an article about a related subject at the moment, so if you wanna check it out, let me know–I'll share it later this week.