There's evidence for g factor (performance on a wide variety of tasks are correlated), and IQ is one of our best measures of g factor.

Measures of g factor are correlated to anatomical values, too, e.g. brain volume.

There's also evidence that g factor is inherited, via e.g. twin studies looking at outcomes of separated, adopted twins.

There's even reasonably decent evidence for g factor in non-humans: https://en.wikipedia.org/wiki/G_factor_in_non-humans