I was randomly searching through an online searchable version of the bible and came across Exodus 21:32 which says "If the ox gores a slave, male or female, the owner shall give to their master thirty shekels of silver, and the ox shall be stoned."
¯\_(ツ)_/¯
You have to understand, the first five books of the Bible are known as the Books of Law and verses in them can be very easily taken out of context.
Slavery during Biblical times in Jewish communities was different than it was in, say, pre-Civil War America. It was't based on race. It was common for individuals with little or no income, or who owed debts to sell themselves into slavery. Think of it as like an indentured servant, in a way.
The Bible actually condemns slavery as it is commonly thought of nowadays, ie. American slavery. Exodus 21:16 says “Anyone who kidnaps another and either sells him or still has him when he is caught must be put to death”. This actually sounds like what we know slavery as in modern times.
Keep in mind when reading text that is over 2000 years old, and put through so many different translations, it can be hard to see exactly what the writer was saying when you are just glancing through it.