Virtually every teenager in America is online. That’s a good thing — just ask the teens.

A new survey from Pew Research Center shows that most teens say social media strengthens their friendships, engages their creative side, and connects them with support. But as our nation debates how to make online experiences healthier for young people, those benefits are being overlooked and a concerning wave of legislation threatens to prevent teens from using social media altogether.

Panic over teens using new types of media is an old story. In the 1980s, activist parents organized to shut down local arcade rooms over concerns about kids’ health. In the 1990s, the country turned its attention to the dangers of video games. Now, with the benefit of hindsight, it’s clear that arcades and “Mortal Kombat” never posed an inherent risk to teen health. But as with all activities, there was such a thing as problematic use.

The same can be said of teenagers’ experiences on social media. What we’ve learned from countless studies over the last several years is while a majority of teens feel supported through the connections they build online, some teenagers fall into a cycle of harmful use. It’s essential to have a thoughtful national conversation about how to support and protect those minors who struggle with the overuse or misuse of social media.

But legislators are drawing the wrong conclusions about how to protect teens in the digital world. A new flurry of legislation threatens to ban kids entirely from social media. Introduced in Congress and in several states, these bills ignore the benefits that social media can provide.

The American Psychological Association, for example, notes that young people form and maintain friendships online and that social media can afford opportunities to interact with a more diverse peer group. Other research shows kids who use texting and social media over TV and video games benefit from more physical activity, less family conflict and fewer sleep problems.

While banning all teens from social media has obvious drawbacks, another collection of bills monitoring and chaperoning kids’ behavior online doesn’t fare much better. The Kids Online Safety Act (KOSA), for example, is a well-intentioned effort to protect kids, but in practice, it would make it harder for millions of teens to access the internet and threaten the privacy of everyone online, adults included.

KOSA, discussed at a Senate hearing last month, details new methods for increased parental surveillance of children and would require websites and companies to change settings for people 16 and under. One of the biggest problems with proposals like KOSA is that requiring social media to offer separate settings and services for teens effectively forces online platforms to ID everyone. To comply with the law, digital rights groups have raised the alarm that social media sites would need to collect and store a host of personal information, with profound privacy implications.

Then there’s the effect KOSA would have on kids seeking information online. At a time when more schools and libraries are restricting access to information on gender and sexual identity and health resources, online resources are often the last and only source of help.

Parental monitoring can and should be done responsibly, but for older children and especially for those in abusive situations at home, KOSA’s restrictions would be invasive and risk putting them in even more danger. By ramping up blanket restrictions and surveillance online, KOSA threatens to jeopardize the privacy and safety of vulnerable young people.

Dozens of civil rights groups and LGBTQ+ advocacy organizations agree, including Advocates for Youth, the American Civil Liberties Union, The Human Trafficking Prevention Project, and the LGBT Technology Partnership. In fact, more than 90 civil rights organizations urged Congress to rethink KOSA and the harm it would cause to children and adults in multiple open letters.

There is a right way to create a healthier world for kids online. Just as we would help young people navigate situations in the physical world, it’s our job to help kids navigate the internet safely and responsibly in the same way. Creating a safer internet for children requires intentional work to educate, supervise and safeguard their online experience without depriving them of the critical benefits that internet access can bring.

Lawmakers can and should protect everyone on the internet by cracking down on harmful actors and establishing safeguards, regardless of age without affecting our rights to privacy or ability to seek safe and trusted spaces online.