Context: I am not a teacher at a school but a manager in a multinational with common sense.
Collect all mobiles before the lessons, return afterwards.
You warn the ones (with a loud voice) who cause trouble and tell them the consequences if the won't stop, this could be:
Inform parents
Remove them from the class room and them to the principal
Let them write a speech about what they did wrong and how they think they will improve on this. They can do the speech in front of the class next time, one by one.
If they don't stop discuss with principal to let them find another school.
If the principal doesn't play ball find another school where they will.
For you: find a job that is more suitable.