These features exist! Apple includes parental controls under "Screen Time" and they works very well. You can whitelist contacts and websites, and even extend them remotely, as an administrator of a child's device.
For restricting access to the internet: https://support.apple.com/en-us/HT201304 For restricting access to contacts: https://support.apple.com/guide/iphone/set-up-screen-time-fo...