When you march up to attack a city, make its people an offer of peace.1
References for Deuteronomy 20:10
If they accept and open their gates, all the people in it shall be subject2 to forced labor3 and shall work for you.
References for Deuteronomy 20:11
If they refuse to make peace and they engage you in battle, lay siege to that city.