This post reminds me of myself in the past.
One thing I found very helpful was to regularly practice mindfulness meditation, as it reduces my desire for entertainment and generally seems to improve my executive function a lot. It also caused other improvements to my well-being in general.
Regarding a technological solution to blocking, I did the following (on Android, I can handle myself on non-portable devices):
1: Use adguard to block the relevant addresses on DNS level. I chose adguard specifically because it allows setting regex-like patterns on what addresses to block, eliminating loop holes.
2: Use applock (I haven't informed if applock specifically is better or worse than alternatives) to require a passcode when opening settings, when opening adguard, and when opening applock itself. Store this passcode in a way that it's cumbersome but possible to reach. Ask a friend or relative to set and store it for you if necessary.
3: Remove the icons of adguard and applock from the home screen, so that they are only reachable through settings -> apps.
This has worked well for me. It's cumbersome enough to discourage me from deactivating it. It's not so cumbersome that I can't update the block list if necessary. It's flexible enough that I can very precisely choose what to block and what not. And it's specialized for (android) smartphones, which are the worst scrolling addiction drivers.
You could also throw in Google parental controls to stop yourself from downloading apps if necessary, but I found that DNS blocks are enough for me.
If you struggle with other devices as well, like TVs, consider whether you can get away with not owning these devices at all.
All that being said, professional psychological help for addiction and executive dysfunction exists. That would have been my last resort if the methods mentioned above hadn't turned out to be sufficient for me.
Good luck, don't give up.