Personally I've found that trying to limit hours spent on $badthing is not as effective as requiring hours spent on $goodthing. (Note that "good" here is shorthand for whatever you find to be more rewarding in the long term, not a universal or moral concept.) For example, instead of saying I will spend no more than X hours on social media or video games, I say that I will spend no less than Y hours on exercise or craft hobbies. The key is to center the good things and fit the bad things around those, instead of the other way around. Make a schedule if you have to. Some people find that making a commitment to other people - e.g. a workout buddy, a craft guild - can help. Start small, with goals that are easier to achieve (though they'll still require some exercise of will). As your self-discipline improves, you can change the balance accordingly.