The phone itself
Turn on Apple Screen Time on an iPhone, or Google Family Link on Android. Set quiet hours, turn on content limits, and make new app downloads need your OK. Then set a passcode your kid doesn't know. Skip that and they can undo all of it in about a minute.
On Android? Google Family Link does the same job. I don't have a step-by-step guide for it yet.