One afternoon last month, hundreds of students at Timber Creek High School in Orlando poured into the campus’s sprawling central courtyard to hang out and eat lunch. For members of an extremely online generation, their activities were decidedly analog.

Dozens sat in small groups, animatedly talking with one another. Others played pickleball on makeshift lunchtime courts. There was not a cellphone in sight — and that was no accident.

In May, Florida passed a law requiring public school districts to impose rules barring student cellphone use during class time. This fall, Orange County Public Schools — which includes Timber Creek High — went even further, barring students from using cellphones during the entire school day.

In interviews, a dozen Orange County parents and students all said they supported the no-phone rules during class. But they objected to their district’s stricter, daylong ban.

Parents said their children should be able to contact them directly during free periods, while students described the all-day ban as unfair and infantilizing.

“They expect us to take responsibility for our own choices,said Sophia Ferrara, a 12th grader at Timber Creek who needs to use mobile devices during free periods to take online college classes. “But then they are taking away the ability for us to make a choice and to learn responsibility.”

Like many exasperated parents, public schools across the United States are adopting increasingly drastic measures to try to pry young people away from their cellphones. Tougher constraints are needed, lawmakers and district leaders argue, because rampant social media use during school is threatening students’ education, well-being and physical safety.

In some schools, young people have planned and filmed assaults on fellow students and then uploaded the videos to platforms like TikTok and Instagram. Teachers and principals warn that social apps like Snapchat have also become a major distraction, prompting some pupils to keep messaging their friends during class.

As a result, many individual districts — among them, South Portland, Maine, and Charlottesville City, Va. — have banned student cellphone use throughout the day. Now Florida has instituted a more comprehensive, statewide crackdown.

The new Florida law requires public schools to prohibit student cellphone use during instructional time and block students’ access to social media on district Wi-Fi. It also requires schools to teach students about “how social media manipulates behavior.”

Under Gov. Ron DeSantis, Florida has introduced a slew of contentious rules for public schools, including restricting instruction on gender identity. But the cellphone law has found support across the political spectrum.

“This is one step to help protect our youth and our kids from the grips of social media,” said State Representative Brad Yeager, a Republican who sponsored the bill. “It’s also going to create a less distracted classroom and a better learning environment.”

Snapchat, Instagram and TikTok each have policies barring bullying, as well as systems to report bullying on their platforms. In a statement, Snap, the parent company of Snapchat, said it supported efforts by parents and educators to foster a healthy academic environment, including “limiting students’ access to personal devices during school hours.”

In a statement, TikTok said activity like posting videos of school bullying and violence “violates our community guidelines, and we remove it when we find it.” Meta, Instagram’s parent company, declined to comment.

Florida’s enforced TikTok detox for students amounts to a mass experiment in controlling young people’s personal technology habits. The law has prompted districts that once gave teachers some leeway over cellphone use in their classrooms to introduce stricter rules.

A new cellphone policy this year at Hillsborough County Public Schools in Tampa, for instance, warns students: “We See It — We Take It.”

More restrictive school cellphone rules could have benefits, such as boosting students’ focus on learning. But they could also increase surveillance of students or hinder crucial communications for teenagers with family responsibilities or after-school jobs.

It is unclear how many other schools ban student cellphone use. Statistics from the U.S. Department of Education, published in 2021, reported that about 77 percent of schools prohibited nonacademic cellphone use during school hours.

The new rules this fall in Orange County Public Schools, the nation’s eighth-largest school system, show how — and why — some districts are intensifying their cellphone crackdowns.

During the pandemic, Orange County educators say, many students’ attachment to their phones seemed to deepen. Students rarely looked up from their devices as they walked down school hallways. Some teenagers covertly filmed their classmates and spread the videos on apps like Snapchat.

“We saw a lot of bullying,” said Marc Wasko, the principal of Timber Creek, which serves about 3,600 students. “We had a lot of issues with students posting, or trying to record, things that went on during school time.”

Orange County educators like Lisa Rodriguez-Davis, a middle school teacher, were also growing exasperated with students’ continual use of their phones during class.

“It was getting out of hand,” Ms. Rodriquez-Davis said, describing how students texted each other during class to arrange meetings in the bathroom, where they filmed dance videos. “I call them ‘Toilet TikToks.’”

To show what teachers were up against, Ms. Rodriguez-Davis posted her own TikToks parodying her struggles with students and their phones.

After the Florida law took effect in July, Orange County decided to impose even stricter rules. The blanket ban bars students from using cellphones during the entire school day — even the time between classes.

In September, on the first day the ban took effect, Timber Creek administrators confiscated more than 100 phones from students, Mr. Wasko said. After that, the confiscations quickly dropped. Phone-related school incidents, like bullying, have also decreased, he said.

The ban has made the atmosphere at Timber Creek both more pastoral and more carceral.

Mr. Wasko said students now make eye contact and respond when he greets them. Teachers said students seemed more engaged in class.

“Oh, I love it,” said Nikita McCaskill, a government teacher at Timber Creek. “Students are more talkative and more collaborative.”

Some students said the ban had made interacting with their classmates more authentic.

“Now people can’t really be like: ‘Oh, look at me on Instagram. This is who I am,’” said Peyton Stanley, a 12th grader at Timber Creek. “It has helped people be who they are — instead of who they are online — in school.”

Ms. Stanley added that she also found the ban problematic, saying she would feel safer at school if she could carry her cellphone in her pocket and be able to text her mother immediately if needed.

Other students said school seemed more prisonlike. To call their parents, they noted, students must now go to the front office and ask permission to use the phone.

Surveillance has also intensified. To enforce the ban, Lyle Lake, a Timber Creek security officer, now patrols lunch period on a golf cart, nabbing students violating the ban and driving them to the front office, where they must place their phones in a locked cabinet for the rest of the school day.

“I usually end up with a cart full of students,” Mr. Lake said as he sat behind the wheel of a black Yamaha golf cart during lunch period, “because I pick up more on the way to the office.”

Mr. Lake said he also monitored school security camera feeds for students using cellphones in hallways and other spaces. Students who are caught may be taken out of class. Repeat violators can be suspended.

Whether the potential benefits of banning cellphones outweigh the costs of curbing students’ limited freedom is not yet known. What is clear is that such bans are upending the academic and social norms of a generation reared on cellphones.

Orange County students described the ban as regressive, noting that they could no longer use their phones to check their class schedules during school, take photos of their projects in art class, find their friends at lunch — or even add the phone numbers of new classmates to their contact lists.

“Imagine that the device you use on a daily basis to communicate with other people is completely gone,” said Catalina, age 13, an eighth grader at a local middle school. (She and her mother asked that her last name not be used for privacy reasons.) “It feels completely isolating.”