Banning phones at school has nothing to do with freedom to use phones. You are not restrained in your freedom because using you smartphone while driving is forbidden.
Kids go to school to learn, not to watch modern cable shopping network (aka Tiktok/Instagram).