So, the actual laws are targeting things more specifically than just "social media". Some are talking about intentionally addictive content algorithms, or personalized algorithms. Others are naming specific named companies.
Don't confuse social media with social networks. Social media is media - they select what you watch, like a TV channel, but personalized for each user. You might get a narrow choice from several options they selected. Social networks are just tools for communication.
I used the word "algorithm" so I'm going to preemptively point out that it means something in relation to social media that's more specific than what it means in computer science.