>>16744417 (OP)
What's distracting you?
4chan? Porn? Social media?
Imo, if you use apple devices, use the built-in parental control app Screen time. It has a password feature. Ask a friend, roommate, or family member to set up the password.
Unfortunately there is no equivalent on android, windows, and linux. Happy to be proven wrong though. There's Screenzen for android, and it has features to make it difficult to uninstall iirc. On windows and linux, you may need to make a normal user with less privilege, and ask your friend etc. to set the admin password.
Selling all your devices and wifi router is an option too. I think you have enough sense and shame not to browse 4chan on work/university's computers.
Or at least get an underpowered device. Like old thinkpad, or old entry-level android that can't handle games.
You can also delete your accounts. Steam, gog, facebook, instagram, etc.
Mindfulness meditation and CBT do the same thing and may help. They basically try to change your automatic response to external stimuli. It may break your bored/anxiety/negative emotion -> time-wasting distraction cycles.