How can I add an age validator page?
Implement the redirect in a module. Either in a kernel request subscriber, see this change record https://www.drupal.org/node/2013014 or in a kernel response subscriber, see https://git.drupalcode.org/project/age_verification/blob/8.x/src/EventSubscriber/pathGate.php.

The second example is from a contrib module you can try as it is. I don't have first-hand experience with this module, so I can't recommend or not recommend it, but this would be off-topic here anyway.