Thomas Sowell said this quote

Despite widespread misconceptions in the United States today that the institution of slavery was based on race, for most of the thousands of years in which slavery existed around the world, it was based on whoever was vulnerable to enslavement and within striking distance. Thus Europeans enslaved other Europeans, just as Asians enslaved other Asians and Africans enslaved other Africans, while Polynesians enslaved other Polynesians and the indigenous peoples of the Western Hemisphere enslaved other indigenous peoples of the Western Hemisphere. The very word “slave derived from the word for Slavs, who were enslaved by fellow Europeans for centuries before Africans began to be brought in chains to the Western Hemisphere. Africans were not singled out by a race for ownership by Europeans, they were resorted to after the rise of nation-states with armies and navies in other parts of the world which reduced the number of places that could be raided for slaves without great costs and risks. Slave-raiding continued in Africa, primarily by Africans enslaving other Africans and then, in West Africa, selling some of their slaves to whites to take to the Western Hemisphere. Meanwhile, the growing range of ships and the growing wealth of nations eventually made economically feasible the transportation of vast numbers of slaves from one continent to another, creating racial differences between the enslaved and their owners as a dominant pattern in the Western Hemisphere. Such a pattern was by no means limited to Europeans owning non-Europeans, however. There were many examples of the reverse, quite aside from vast regions of the earth where neither the slaves nor their owners were either black or white.