What does Deuteronomy 20:18 mean?
Do this so they don’t teach you to do all the disgusting things they do for their gods, which would make you sin against the Lord your God. Deuteronomy 20:18 - Modern Text Bible
(The reason for this harsh command is to prevent Israel from being influenced by the idolatrous practices of these nations.)