I'm not sure I'd say flawed so much as I'd say myopic. Which is absolutely still a flaw, but a very specific one that allows you to contextualize the results of an IQ test rather than discard them as worthless. IQ measures a subset of human intelligence pretty effectively, but misses the bigger picture. There's large parts of human intelligence that can't be measured using a test like that. A test can only provide stimuli for the mind and measure its reaction over the short period of time while taking the test. Among other things, it can't measure long-term recall or the ability to rehearse/learn information and skills over time, both qualities people would naturally associate with intelligence.
It's our need to have a single spectrum from mental retardation to genius-level that's led us to try to create a test which assigns a number to intelligence. But intelligence is multidimensional and an IQ test just fills in some of those dimensions.