Don't all schools ban phones? They were banned when I was in highschool maybe ten years ago. And smartphones were already very much a thing by that point. Everyone still used them because enforcement was basically impossible.
The only teacher I ever saw who had an effective strategy was my math teacher. He told kids to put their phones on their desk at the beginning of class so that they were out in the open. If he found out you had come to class with a phone and didn't put it on the desk, you'd lose it, even if you weren't using it. And then he said you could use them for a few seconds to check them, but you had to keep them out in the open. No hiding the phone by your legs.