If you look at top universities globally, you often come up with the US, UK and SE Asian countries – I think it’s because the money invested in research and tradition of culture and analytic approach (the last one especially in the UK)
Unfortunately it mostly comes down to money. Countries that can afford to invest more in research come out better, UK, USA, China etc..
For countries in which just making sure everyone has enough food and clean drinking water is a challenge, funding science isn’t a big priority.
It has absolutely nothing to do with one nationality of people being more intelligent than another, we get people from less developed countries coming to work in scientific research here in the UK all the time and making really great contributions.