Discipline is super important part of life, whoever heeds discipline shows the way to life, but whoever ignores correction leads others astray.
One of the best apps to stop mindless surfing I found is Leechblock, it allows different settings, different times and modes. It’s possible to put a password, so you couldn’t correct the settings, limit time per page, even blur a page. Proper documentation Override function in some serious cases.