Apple and Google Play both have 'Parental Controls' that restricts what is accessible across most of the device. The underlying functionality is there. Parents just don't leverage it at-scale.
If a school provides a smartphone, it would be on IT to prevent misuse by students by using MDM.
If a parent provides the phone, then we circle back to the 'Parental Controls' that are available.
Apple, Parental Controls: https://support.apple.com/en-us/105121
Apple, MDM: https://www.apple.com/education/k12/deploy-and-manage/
Google Play, Parental Controls: https://safety.google/intl/en_us/families/parental-supervisi...
Google Play, MDM: https://support.google.com/googleplay/work/answer/7042221?hl...