I don’t think it’s completely invalid.
As an experiment my whole class in high school was forced to do an IQ test.
Those who excelled at mathematics tended to get much higher scores than those who struggled with mathematics.
But yeh IQ fails to show others aspects and characteristics of one’s personality. There’s a lot of high iq people who are lazy and lot of low IQ people who are hardworking. So it’s a terrible predictor of where you end up in life.
I think it’s more just a good test of how individually efficiently you can solve problems.