Social systems, like kindergarten, can tell if someone is smart or average or very not smart. Society generally only tests those at the outer boundaries to verify and classify them into groups.
You're right, someone who seems average (or totally unknown to social systems), but is actually super genius, might not get tested. It's the "genius in the rice paddy" argument and yes, those exist. Srinivasa Ramanujan was one.
That doesn't mean IQ is fundamentally flawed. You don't need to know if someone is 99th percentile or 99.0004 percentile to know they are probably the smartest in the average room of a hundred people and that's what we use IQ to determine.