Network wide, or just for your own browser ?
There are a number of addons for Chrome/Firefox etc that allow you to block sites, usually for staying focused during work hours.
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.
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.