In my opinion, my school (highschool junior now) has been online since the start of 2017! Because of this, we don't really have any issues with devices being used irresponsibly. Although many students including my classmates prefer to learn from text or lecture.
otherwise if a phone is being used irresponsibly or inappropriately, it should be taken by the teacher (only after a few warnings) or put away in a back pack.
The way students should have their phones depend. If the teacher is giving a lecture or instructions for an assignment, then it should be put away so they pay attention. If the students need to do research, then phones should be allowed to find information they need.