IQ is not measurable by knowledge, but by speed of execution and understanding through limited information.
IQ is a proxy for intelligence. People often use them interchangeably, but they’re not the same thing. Your statement is more valid for intelligence than IQ.
A person with say math degrees will not take the same test as a person with a highschool diploma.