Going back to the original topic…
One of the whole points of the Bible is that the Holy Land isn’t just some random place. It’s Eden. Whenever Israel, as the rightful heir of Adam, is going toward it or living in it, things are going according to divine plan. Whenever Israel is driven out, the people have sinned and are being punished. The kings or high priests of Eden are the direct descendants of Adam and Abraham. It’s their job to guard and care for the Land, and to keep it holy by living in a holy way. All this leads up to the coming of Jesus, the Messiah and Emmanuel, bringing the covenant family relationship between God and Israel to all humans, and making it culminate in His eternal Kingdom.
The corollary to this is that, pre-Jesus, when you have other groups living in the Land who are not close kin to the Israelites, they don’t have any inherited right to be there. They are interlopers and invaders, and so they are people to guard the Land against. The closer related they are to the Israelites, the more gently they are treated because they have more right to be there. And after the Land is won, the Israelites follow the normal laws of warfare towards any invading people. But any pagan thing that pagans do in the Holy Land is much more an abomination to God than normal, because everything in the Holy Land is supposed to be kept holy to God.
The scary commands from God all happened when the Israelites were initially fighting people who are associated with demonic powers, whose own mythology claimed descent from “divine messengers” who taught them things like necromantic magic, divination, and child sacrifice. The Amorites were living in the Holy Land, but committing constant blasphemies in their way of life, and teaching them to Israelites. So the way that Israel was commanded to treat the Amorites living in the Holy Land was very similar to the way they were commanded to treat their own blasphemers. But they weren’t commanded to kill every single Amorite everywhere, for the rest of time – they only are commanded to kill the ones inside the Holy Land, at a specific time. That is pretty harsh, but their actions have a clear stopping point.
However, you will notice that even with the Amorites, you get a person like Ruth who turns around this curse of her people’s horrible beliefs, by her own love and trust of her mother in law leading her to worship God truly. She is allowed to come in from outside the Land, she is protected as a widow and stranger, and she becomes a valued part of Israel – and in fact, her grandson by her new husband Boaz is King David; and Jesus is her descendant through Mary.