I'm a research psychologist. I don't agree with some of the assertions by @AliceD above. A lot of the disagreement on this topic is about what we mean when we say intelligence, so it would be helpful to define what you mean by IQ. To a psychologist, IQ refers to a specific measure, not the general construct of intelligence. Certainly the use of measure matters a lot:
Discussion of what intelligence means across cultures: https://www.apa.org/monitor/feb03/intelligence.aspx
The original IQ tests such as the Stanford-Binet were more culturally dependent, similar to the infamous SAT question about a 'regatta', which is a term that certain income and ethnic groups learn about more frequently.
However, for decades cognitive scientists measure intelligence with diverse methods, many without words at all (so there's less room for some types of bias). Performance on these tasks all correlate positively in populations, and are taken to indicate a stable underlying trait: g for general intelligence. Education improves g, but not very much! About 1 IQ point per year of education, or ~1/15th a standard deviation per year.
The biggest effects on g are genetic mutations, lead exposure, malnutrition, stuff like that. All g outcomes are complex interactions between genes and environment.
Accessible, affordable, brief book of the research that addresses many misunderstandings: https://www.amazon.co.uk/Intelligence-That-Matters-Stuart-Ritchie/dp/1444791877
About the original question, if one measures education and g separately, one can see whether variation in one is due to variation in the other. That's how psychologists assess independence. These are reliably linked, but only weakly.