Here's what really worked in my 20 year battle against this. Not perfect, but a balance of powers, and still enough got done to stay afloat:
- Replacement ideas, and have them ready and in reach. E. g. I try to have an ever-lasting inflow of new comic books and graphic novels, so there is no excuse to doomscroll in bed or at the desk, even when it is a "deserved break". It's not easy though to compete with something that has been designed for addiction, to milk your dopamine.
- soft and / or hard block. E. g. a browser plugin that makes sites like this black&white after 30 minutes. Then I know that as of now, it's clearly not a "deserved treat", but bad for my health.
- for a start, don't even try to stop it, but observe thought and start an inner dialogue, such as: "what do I gain from this?"
- have clear rules, and log violations in a journal
- when you catch yourself, it's hard to stop immediately. set a 10 minute timer instead, stop when it goes off. The wonderful thing about it: For those 10 minutes, it's completely legal and guilt-free.