Banning phones in schools needs to be done very cautiously.
In my high school, one of my teachers had one of the best cell phone policies I'd experienced, which was simply, if you had your phone out, she'd just say "hey, what are you doing on your phone right now?" It didn't matter what exactly it was, and there was no judgement passed, but it kept us engaged if we got too distracted, encouraged us to find and share interesting new topics over just doomscrolling, and led to some legitimately informative and valuable conversations.
Other classes would let you use your phone after you got your work done, which acted more as an incentive for completing your work, rather than something you had to sneak in between the teacher talking.
That said, my high school was a competency-based school, which changed the incentives for self-governance of the learning process compared to traditional high school. And of course, it was high school, where most students had better self control.
That might say more about the state of education than the dynamics of phone use in the classroom, but I do feel like schools often try to make students conform to the system as their almost exclusive goal, rather than making the system work for the student, and thus, harsh anti-phone policies aimed at increasing attention in the classroom actually just make students even more angry at the system of schooling, and less likely to enjoy the process of education as a whole.