As somebody from the "Global South", it's ridiculous to say that the average quality of work in top universities in, say, India, is on the same level as the average quality of work in top universities, in, say, the US.
This is not due to any difference in the inherent quality of the researchers, but due to (IMO) a lack of resources. This falls into two categories:
The first is the lack of a high-expertise peer/mentor community. Historically most research communities have centered in US/Europe. So even getting advice and mentorship is much more difficult, and the difficulty is exacerbated if you can't travel to conferences. Even if you manage to become established in your field, if you're not travelling to conferences and networking with other top researchers, you won't be privy to new research directions and questions, won't be able to take part in collaborations on interesting research projects, and won't have as productive a career as your colleagues in the global North. This also leads to a feedback loop (your research isn't exciting → you don't get to go to conferences to participate in research conversations → your research isn't exciting, and so on). In the end, the process of doing science is a social phenomenon, and you can't sequester yourself in your own country and expect to be a good researcher working on interesting problems.
The second category of resources is funding. The pool of money available for research is just much smaller in the global South, and makes certain kinds of research just impossible (think big distributed systems research, GPU-heavy ML research, etc.) So if you want to do that kind of research, you can't really stay in your home country.