Escaping from these things is a long slow process involving a lot of work.
The book Atomic Habits is very good. It talks about how you have a limited willpower budget and the best way to make long term change is to only make small changes at any given time, and stick with that small change until it requires zero willpower. Then you can make another small change.
Basically it’s like making a sculpture by putting down little layers of concrete, then waiting for the concrete to fully cure before putting more concrete on it.
You make a little change to your habits. Something like “I don’t touch any apps other than alarm clock for the first five minutes of my day”.
Then you do a huge and nearly exhausting amount of work to make sure the first five minutes of each day aren’t your normal escape patterns.
Trying to go whole hog takes more willpower than you actually have, and so it breaks down. Trying to alter the first five minutes of the day takes an amount of willpower you can actually afford to spend.
And the key is, after you’re consistent with it for a while, it eventually takes no willpower, and is now by definition a “habit”.