But in many areas your statement is true.
There is also the old cliché that there is a difference between 10 years of experience and one year of experience repeated 10 times. If you are a coder who has repeated the same couple years of experience 10-15 times, then you might be over-estimating your own value.
So as you get older, it takes some humility to truly look at yourself and determine your own value. This is why I moved away from coding and towards product management - I'm a decent coder and people appreciate having me on the team, but my value lies in the lessons learned over the years outside of coding. So I seek roles where I can use that experience, and not the decades of coding experience on mostly dead tech stacks.
Same company will fire someone after 3/4 years because they haven't moved up.
Look into it, it’s real. The people saying otherwise are either lifers at their company or lying.