Screen Time
As Jeff noted in the comments, screen time is a common new term used to describe any time a person spends looking at a digital screen, regardless of the device it is on. Here are some examples of its usage:
I limit my children's screen time to 1 hour on school days and 2 hours on weekends.
You have had enough screen time for now. It's time to go play outside.
My screen time is really high, I need to find ways to take more breaks.
Watching Screens
While the above phrasing is the most common, watching screens is also fine and easily understood. Your first example works well:
You shouldn't spend too much time watching screens.
As you point out, this cannot be immediately substituted for other, more specific phrases. However, they can be reworded to work better as in the following example:
You shouldn't watch screens too much.
One note about this phrasing (especially if talking to a child or someone who is likely to be petulant about restriction), is that "watch" is inherently passive and specifically means "consuming content without interacting with it." For example, one might watch TV or a movie or YouTube. However, one would not watch a video game (unless someone else was the one playing it). And to watch a social media site usually means something different as well.
This could lead to situations where you tell a child "Don't watch screens for more than an hour" and then the child says "I wasn't watching, I was playing!
Because of this, screen time is a more encompassing phrase.