Man I hear 'ya! It's easy to get caught up in different web sites and YouTube is especially a big trap for me.
The key is to strive for balance. You can look for causes and such. Nothing wrong with that, but what do you do with the new information you end up finding? You still have the same problem. I think in my case it's a dopamine dump we get that brings a form of anticipation pleasure.
I say basic stuff similar to any other addiction process. First, recognize and admit you have a problem. Second, surrender (transfer power/control) that problem to God or some form of higher power. Not sure where you are on spiritual things... Then do some different routines. Take a walk outside for 15-30 minutes when you'd normally be on the computer. Go to a park and people-watch (girls of course lol). Just change things up. Maybe after a while, go back and allow yourself only a couple hours a day of browsing.