Research suggests that the correlation between height and intelligence is about 0.2 (See references below) This is a very small correlation, suggesting that they are only slightly related. There are a variety of conjectures about whether this correlation is related to genetics or environment. Certainly poor nutrition is associated with shorter stature and impaired brain development and that would cause such a correlation. Alternatively, it has been hypothesized that taller stature and greater intelligence are qualities that provide a mating advantage, resulting in a greater percentage of offspring from parents with these genetic attributes.
Another hypothesis is that taller people have larger bodies and larger brains than shorter people. Since larger brains are correlated with higher intelligence, albeit a weak correlation, this could be a factor creating the correlation between height and intelligence.
However, for people of average height, we would expect, on average, a brain of average size, and on average, an average IQ. The tenuous relationship between height and intelligence suggests that it is of little use in estimating an individual’s intelligence. In contemplating the relationships between such variables, it’s important to remember that averages mean almost nothing in predicting individual attributes. For example, if you stand on a block of ice and put your head in the furnace, your average body temperature might be normal.
References:
Pearce MS, Deary IJ, Young AH, Parker L (June 2005). “Growth in early life and childhood IQ at age 11 years: the Newcastle Thousand Families Study”. International Journal of Epidemiology. 34 (3): 673–7. doi:10.1093/ije/dyi038. PMID 15746206.
Silventoinen K, Posthuma D, van Beijsterveldt T, Bartels M, Boomsma DI (November 2006). “Genetic contributions to the association between height and intelligence: Evidence from Dutch twin data from childhood to middle age.” Genes, Brain and Behavior. 5 (8): 585–95. doi:10.1111/j.1601-183X.2006.00208.x. PMID17081263. S2CID 11248397.