Regarding taking war captives as slaves, this was the standard practice in the ANE.
Slavery in the ancient world, from the earliest known recorded evidence in Sumer to the pre-medieval Antiquity Mediterranean cultures, comprised a mixture of debt-slavery, slavery as a punishment for crime, and the enslavement of prisoners of war.
In Ancient Egypt, slaves were mainly obtained through prisoners of war.
Slaves were generated in many ways. Probably the most frequent was capture in war, either by design, as a form of incentive to warriors, or as an accidental by-product, as a way of disposing of enemy troops or civilians.
That prisoners of war, spared on the battle field, were reduced to slavery is amply attested in the annals of the long history of the Ancient Near East.
The economic advantages derived by the state from this practice were obvious enough to make all conquerors follow the example set at the dawn of history. The great projects of military fortifications, of road, irrigation, and temple construction, accomplished by the state would have been almost impossible without the help of the war prisoners, many of whom were skilled craftsman.
Throughout Egyptian history, the best-attested method of entry into enslaved status was through abduction as a prisoner of war.
For the cities that God did not command to annihilate, they offered them surrender terms. If they accepted, they would become tributaries. If they did not accept, all the men would be killed and the women and children would be war captives.[Deu 20:10-14 KJV] 10 When thou comest nigh unto a city to fight against it, then proclaim peace unto it. 11 And it shall be, if it make thee answer of peace, and open unto thee, then it shall be, [that] all the people [that is] found therein shall be tributaries unto thee, and they shall serve thee. 12 And if it will make no peace with thee, but will make war against thee, then thou shalt besiege it: 13 And when the LORD thy God hath delivered it into thine hands, thou shalt smite every male thereof with the edge of the sword: 14 But the women, and the little ones, and the cattle, and all that is in the city, [even] all the spoil thereof, shalt thou take unto thyself; and thou shalt eat the spoil of thine enemies, which the LORD thy God hath given thee.