I’m pretty sure protections against age discrimination only kick in federally if you’re 40 or older, though some states may expand it to younger workers.
More generally, discrimination protections for employment are much narrower than commonly assumed to be. Discrimination is legal by default and becomes illegal only when a specific law cites a specific protected class. Some characteristics that are perfectly legal to discriminate on because there is no US law protecting the class: age under 40, smoking, obesity, height, car you drive, method of commuting, sports team favoritism.