This sounds illegal in the US.
(Also, it's the opposite of the usual illegal ageism we see in post-dotcom tech companies.)
More generally, discrimination in employment is legal by default, unless a specific protected class is created by a specific law. Many classes of discrimination are legal, such as against smokers or obesity.
States and localities may have more restrictions than at the federal level, of course.
As an engineer in my 50s I've never personally been on the receiving end of ageism, but I've definitely seen extremely smart young engineers passed over for opportunities because they were deemed too young/inexperienced
Discriminating against how old someone is is illegal, not usually how young, but this isn't discrimination because of an uncontrollable attribute, it's requiring experience outside of what being a team lead at a FAANG would normally afford you.
The fact is that FAANGs do things in a very particular manner and on small, focused teams. That's the opposite of how start ups work and applying most of the managerial "skills" that are in place at FAANGs are a good way to apply a ton of unnecessary bureaucracy to a company that doesn't even have an HR department yet.
"Founder is formerly Google and Facebook!" makes me stay very very far away from the company because outside of the VC world the reason those words have power are red flags.