A heritable trait is not inherently genetic.
That’s where twin studies [1] come in. The evidence for genetic factors explaining intelligence and academic achievement is extremely robust.
[1] https://www.science.org/content/article/genes-dont-just-infl...
[1] https://slatestarcodex.com/2017/05/26/the-atomic-bomb-consid...