Rabbis Dovid Eliezrie, Rabbi Dov Greenberg & Rabbi Yitzchak Schochet explain how slavery was allowed in the Torah.
https://youtu.be/tXBTEeTb-2Y

You Are of Your Father the Devil
39They answered him, “Abraham is our father.” Jesus said to them, [Gal. 3:7, 9] “If you were Abraham’s children, you would be doing the works Abraham did,
40but now you seek to kill me, a man who has told you the truth that I heard from God. This is not what Abraham did.
Gal. 3:7, 97Know then that it is those of faith who are the sons of Abraham. 8And the Scripture, foreseeing that God would justify the Gentiles by faith, preached the gospel beforehand to Abraham, saying, Gen. 12:3“In you shall all the nations be blessed.” 9So then, those who are of faith are blessed along with Abraham, the man of faith
41You are doing the works your father did.” They said to him, “We were not born of sexual immorality. We have Deut. 32:6; Isa. 63:16; 64:8; one Father—even God.”
42Jesus said to them, “If God were your Father, you would love me, for Heb. 10:9 I came from God and am here. I came not of my own accord, but he sent me. 43Why do you not understand what I say? It is because you cannot Jer. 6:10; Cor. 2:14 bear to hear my word.
44Matt. 13:38You are of your father the devil, and your will is to do your father’s desires. Gen. 4:8, 9; 1 John 3:12, 15" class="scriptRef">15; [Rom. 5:12] He was a murderer from the beginning, and [1 John 2:4] does not stand in the truth, because there is no truth in him. Gen. 3:4; 2 Cor. 11:3; Rev. 12:9When he lies, he speaks out of his own character, for he is a liar and the father of lies. 45But because I tell the truth, you do not believe me. 46Which one of you convicts me of sin? If I tell the truth, why do you not believe me? 47Whoever is of God hears the words of God. The reason why you do not hear them is that you are not of God.”44Matt. 13:38You are of your father the devil, and your will is to do your father’s desires. Gen. 4:8, 9; 1 John 3:12, 15; [Rom. 5:12] He was a murderer from the beginning, and [1 John 2:4] does not stand in the truth, because there is no truth in him. Gen. 3:4; 2 Cor. 11:3; Rev. 12:9When he lies, he speaks out of his own character, for he is a liar and the father of lies. 45But because I tell the truth, you do not believe me. 46Which one of you convicts me of sin? If I tell the truth, why do you not believe me? 47Whoever is of God hears the words of God. The reason why you do not hear them is that you are not of God.”49Jesus answered, “I do not have a demon, but I honour my Father, and you dishonour me.
50Yet I do not seek my own glory; there is One who seeks it, and he is the judge.

51Truly, truly, I say to you, if anyone keeps my word, he will never Luke 2:26see death.” 52The Jews said to him, “Now we know that you have a demon! [Zech. 1:5] Abraham died, as did the prophets, yet you say, ‘If anyone keeps my word, he will never Matt. 16:28; Heb. 2:9taste death.’ 53Are you greater than our father Abraham, who died? And the prophets died! Who do you make yourself out to be?” 54Jesus answered, “If I glorify myself, my glory is nothing. Acts 3:13; Heb. 5:5; 2 Pet. 1:17It is my Father who glorifies me, whom you say, ‘He is our God. 55But you have not known him. Matt. 11:27I know him. If I were to say that I do not know him, I would be a liar like you, but I do know him and I keep his word.
56Your father Abraham Matt. 13:17rejoiced Luke 17:22that he would see my day. [Heb. 11:13] He saw it and was glad.” 57So the Jews said to him, “You are not yet fifty years old, and have you seen Abraham?” 58Jesus said to them, “Truly, truly, I say to you, before Abraham was, Ex. 3:14I am.” 59So they picked up stones to throw at him, but Jesus hid and went out of the temple.