They aren't. The device administrators (ie. the parents) set an age range in the OS' config and then the OS tells applications the value. That's it.
And the other problem is that you may wake up and find this system enabled by default for everything unless you submit to age verification, like the authoritarian bullshit Apple pulled in the UK.