Network wide, or just for your own browser ?<p>There are a number of addons for Chrome/Firefox etc that allow you to block sites, usually for staying focused during work hours.<p>If you want to do it network wide, you could utilise something like a PiHole, but that's a bit extreme for blocking access to one site.<p>The other option would be to put an entry in your hosts file for www.youtube.com etc and point them at 127.0.0.1.
Setup a pi-hole: <a href="https://pi-hole.net/" rel="nofollow">https://pi-hole.net/</a><p>Although doing that for just one domain is overkill.