Block youtube, limit this site to a certain time period
Put your phone away somewhere on a shelf
But most importantly, get a hobby that takes a lot of time and could fill your entire day. Make sure you always have something you need to do.
If possible, just get a hobby that doesnt involve computers. Like go outside without your phone and take an hour walk. Go outside with a sketchbook and just draw incredibly bad drawings. Work out. Woodwork.
Pick something that you can sink a ton of time into, that you can get better at and that gives you some enjoyment from doing it
The most important thing is remembering that will power is not an infinite resource. Its been scientifically proven that it erodes every time you have to deny yourself. Dont make it harder for yourself. Dont be on your pc if you dont need to, dont have your phone nearby if you dont need to, dont have a cabin filled with junkfood.
If youre really far down, watch this video series on a "dopamine detox", which serves as a proof to yourself that you CAN control yourself, you CAN focus and be a master of your own impulses. https://www.youtube.com/watch?v=_vcGF3HqZXg&list=PLoxRG0tZiah9dfTgJmqFFW9HXBoAwSkB-
After that you should focus your time on the things you do want to do.
The one thing that helped me a lot was his advice "think of a ghost image of yourself, like the ghost you race in a video game, but imagine it to be the version of yourself if you didnt watch that youtube video, if you didnt eat that icecream, if you instead spend your time doing the long term goal you wish you could.
The key concept if that all things in modern life, including your phone, your messenger apps, discord etc, are made to give you a ton of mental rewards and create a dependence loops. If you have ever had water after a long hot day without any drinks, or food after being super hungry, you will know how much better it tasted. That is caused by the baseline. The more rewards you get the more you crave more intense ones or more immediate ones. Short term rewards are more reinforcing than long term ones, and your lizard brain is evolved to seek them out as much as possible. The more short term rewards you get (browsing bunkerchan every 5 minutes, watch youtube, checking messenges), the less impactfull each reward will feel, and the less impactfull the reward you get for long term things will be. So your brain seeks out more short term rewards to compensate. You need to forcibly stop yourself from getting short term rewards.
If you take my advice (no phone etc), you will feel on edge for a while, antsy and longing for any stimulation or phone, but that is good. That means its worth it. If you keep it up you will start to reinforce neurological pathways to rewards from activities you chose, rather than short term. You will also build discipline because you will no longer long so much for short term rewards.
This is also the only benefit that things like nofap has. It stops you from getting too much easy short term rewards (jacking off) and you build discipline by reinforcing alternate pathways (ie the "if you feel like jacking off go for a run" type advice). There is no other benefits, the masturbation part of it doesn't play part in it, your sexual drive will eventually normalize again after 4 weeks of nofap (from personal experience).
Good luck. I and the rest of this community would you rather stop posting here and get your life back into your hands, so you can both be happier and further the cause, than you wasting your life being terminally online here.