From what I understand is that slavery in its earliest form (before the U.S) was based on religion and social economic status. I also read that the start of slavery in the U.S was started with indentured servants of both European and African descent. So if all of this is true then my question is why did slavery become a thing of race in the United States?
From the European perspective, or at least the English, the emergence of a racially defined slave system depended on three factors: new understandings of personhood and rights in industrializing England; a high land-to-labor ratio in the Americas; and, the fragility of labor relations between planters and laborers. (While Native Americans did make up a share of enslaved peoples in the British New World, their use was not widespread, so I'm confining my answer to Euro-indentures and African slaves.)
Per John Thornton, a consensus emerged in England and the New World that indenturing whites was antithetical to nascent beliefs about what we might call human rights. Others, including Eric Williams, have argued that the process of replacing white indentures with black slaves rested, too, on the need for laborers in the early English textile mills. Therefore, African laborers replaced British laborers due to a sudden need for white laborers in industrializing England.
The US has, and continues to have, a high land-to-labor ratio. What I mean by a "high land-to-labor ratio" is that British planters faced simultaneously an abundance of land and few available laborers to actually farm said land. As planters and indentures slowly eroded the indenture system, planters sought out new sources of labor. The growing slave trade on the West African coast was, in many ways, a logical solution to the problem of populating the workforce in the New World.
Another explanation, advanced by Edmund Morgan, is that planters popularized white privilege by extending political, legal, and economic rights to poor whites in what would become the U.S. According to Morgan, planters practiced a plan of divide-and-conquer following Bacon's Rebellion. By expanding protections for white indentures, for example (the logic goes), planters created both a sense of difference between African- and Euro-Americans, and set the context for eventually replacing the indenture system with that of chattel slavery.