Parents can still confiscate their children's belongings even if the child bought them. Imagine a child buys large speakers and puts them on blast with windows open in the middle of the night. Doesn't matter if the child bought them on their own, the parent should still be able to confiscate them.
Cellphone service providers will most likely be unwilling to start a contract with a child, so the child can't get a SIM on their own. Also if the parent wants to make sure that the SIM card they get can't be used with another phone than the one they provided, they can get an eSIM.
The child is also not going to have access to their home wifi unless their parents provide the password. That network is also totally in their control. They can setup a firewall.
School networks should also have firewalls, if they even provide wifi to the students which arguably they shouldn't.
The only remaining way to get internet access is through open networks on restaurants, etc.
If the child is old enough to be hanging around outside like that though, they're likely old enough for social media, I think.
Skipping lunch and saving up the dinner money to spend on an ex-demo Performa 5200 and a 56k modem is how I got online back in the late 90s.