That's a nasty (and quite frankly, outdated) thing to say!
I'm 38 and 8 months pregnant. It's my first.
It took us 2.5 years+ a (a chemical, possibly twice, a mc and finally on the 3rd/4th (I'll never truly know) attempt pregnant) some people are lucky, others are not.
I know people who had a child in their mid/late 40s because they were trying for 12 years.
All the women in my nct group are a similar age to me, too. 35-40
Of all the pregnant people I've come across, only 2 are what I'd consider to be "young" (my cousin at 21 and my godmothers daughter who is early 30s)
One of my friends had her first at 38 and 2nd at 44.
I hate this narrative that "you're too old"
It's also offensive, nobody knows how long a couple may have been trying for to get pregnant in the first place. Some may well have started when they were much younger and it took so long that they're in their late 30s when they do eventually carry a baby to term.
Don't listen to ANYONE.
Not too old at 38 at all.
If that's what you want to do, go for it but don't let someone else's archaic opinion tar you own life decisions.