I think it is more nuanced than that. You can use social media as a way to connect with new people, inspire others, and earn money in some cases. But if you use it as a way to put yourself down and compare yourself to a perfect snap shot of someone else's life then you're gonna end up miserable.
In the end social media isn't going anywhere and that puts the responsibility on your shoulders. Are you going to use it to better your life or as an excuse to feel bad about it? The choice isn't easy but that doesn't mean that it isn't there.