All the politically and economically prosperous countries show as high and the basket cases show as low. And if you sit in on their political discourse it increasingly sounds like you’re in an open air mental institution. (Though regrettably that model has been losing a lot of predictive power in the democratic West lately).
IQ is also only one (mediocre) signal you are putting a lot of emphasis on. India does not score well, yet it is clearly emerging and has very successful individuals from mathematics to chess.
Someone mentioned malaria-afflicted test takers before. Of course better healthcare leads to lower disease load, which leads to higher IQ, but it’s only a weak link, simply not leaving old tires with water strewn about the place is free.