White supremacy is a side effect of imperialism. If white europeans hadn't colonized the world they would have less basis for "scientific racism" and less ability to force those ideas into the minds of other people. The reason europeans were so successful in the domination of other nations is just a question of lucky material conditions.
Lucky european material conditions theory: The bubonic plague came at a perfect time for europe to allow for a rejiggering of their politics, economy, and technology. The sudden drop in population meant that they could rehabilitate arable land as they needed it instead of having to constantly make more from scratch. It changed the limiting factor to one of labor instead of food. It allowed them to over produce food for storage and gave them a buffer against crop failures for several generations. Basically the survivors of the black plague had breathing room and practice fighting each other for a few generations with little distractions just in time for intercontinental war to be technologically feasible.
Other parts of the world the population grew as fast as food production would allow with little room to stop and reorganize.
My theory on the cause of racial supremacy in general: 2 people have a fight, 20 generations later their offspring are still fighting and see themselves as superior to the other side because they "know" their ancestors were the morally correct one even if they don't know what the fight was about. (the first book of the Abrahamic bible is this story over and over again.) That moral high ground eventually becomes solidified into a divine right when one side prevails over another. The victors now believe themselves anointed by a higher power. With their age old feud over they find new people to demonize. They dig up old feuds or invent new ones because it has become so ingrained in their society that they are superior and they need someone to be superior to. The bigger their society gets the bigger their enemies become and the reasons for their hatred more ineffable.