When we read today’s verse, it may seem as if God is being mean. But the inhabitants of the land had 38 years to repent of their idolatry and turn to God. According to the commentary, the term “drive out” means “not, however, by expulsion, but extermination”.
Numbers 33:52, “Then you shall drive out all the inhabitants of the land before you and destroy all their figured stones and all their molten images and completely demolish all their [idolatrous] high places.”
If the inhabitants had repented they would have been spared. How do I know?
Numbers 33:56, “And as I thought to do to them, so will I do to you.”
God is not willing for any to die, (2 Peter 3:9), he leaves the choice up to us. Either we serve Him and are blessed, or we don’t and are cursed.