Not OP, but I do this too. You can configure Screen Time on an iPhone. There you can limit the total time the device can be used each day. It's also possible to limit usage to certain apps, or block access to certain categories of apps, and allowing only certain people (e.g. family members) to be contacted or messaged.
If your child has their own Apple ID, Screen Time works across any other Apple devices linked to that Apple ID.
In my case, we've turned off all web access, have certain educational games available for a limited amount of time, and only allow outbound texts to grandma.
It's extremely robust – most of the hacks I've read about (or heard from parents with older children!) involve trying to record the screen while you type in the unlock code to change a restriction. Physical attacks are also popular: shoulder surfing is a given, but one coworker said their kid put a tiny layer of hand lotion over the screen to capture where they touched and then attack the code. Clever.
If your child has their own Apple ID, Screen Time works across any other Apple devices linked to that Apple ID.