Banning social media for teenagers could be very helpful in this area, the same way as banning gambling for teenagers is supposed to be helpful, but there are always the stubborn ones who know how to find their way around and bypass the restriction. The type of punishment that is to be given to anyone found guilty will determine the level of people who will respect that restriction. Some people know their way around, but the fear of facing punishment if caught will make them obey the law.
In my opinion, prohibiting young people or teenagers from using social media is currently impossible, unless they believe that social media should only be used when necessary and not excessively.
Most young people and teenagers today undoubtedly spend their daily lives on social media, whether wasting time or working. So, in my opinion, only awareness can make them not use social media too often.