Yes, there is the difference between YHWH ordering it or man deciding on it. Saul didn’t slay all the Amalikites, as instructed, and the result was one of there descendants, Haman, instituting the First Holocaust.
Same with vengeance. Simeon and Levi avenged their sister Dina’s rape and that did not go well for Israel.
It is also good to remember that this is YHWH’s world, everything that happens here, while not necessarily caused by Him, is still permitted by Him for His reasons, which are not our reasons.
Some people think the Canaanites were Anakim - the offspring of demonic mixing with humans (as possibly in the days of Noah, and the cause of the Flood).
The Israelites complained that the people were there “giants”, and that they were like grasshoppers compared to them.
And Josephus mentions that giant’s bones used to be found around Hebron.
So, it is possible that the command to kill them all was intended to wipe out the polluted gene line (as with the Flood).
The Israelites didn’t complete this; hence, Goliath,etc.
Another thing that I have noticed in studying the Bible is that the Bible is quite likely literally correct in recording what a person says. That does not mean what the person said is true or without error.