There are studies that show how heritable intelligence is. Very.
It is quite common people say, that something is only a correlation and not causation. But if you can point to a common denominator, that has been shown multiple times, to have a massive effect, it's not likely to be just a coincidence. Genes are this common denominator. Society and habits (for example, protestants vs catholics) are another.
Things that consistently impact the whole population are not just a random process that picks: "You will be clever, ugly.", "You will be pretty, sporty, but will be dumb." It's always genes, society and habits.