most tools in this space treat it as a willpower problem: block the bad thing, problem solved. but the compulsion you're describing is a signal, not a bug. the boredom and loneliness without comments suggests the underlying need is real, it's just being met in a low quality way.
i've been thinking about this a lot in the context of attention generally. the tools that actually help aren't the ones that block things, they're the ones that make you more aware of the pattern so you can consciously choose. realizing you've been reading youtube comments for 20 minutes is fundamentally different from having youtube comments blocked. one builds a skill, the other is a crutch you'll uninstall in a week.
https://www.science.org/content/article/people-would-rather-...