God insists on the proper framing of the Israelite conquest of the Promised Land. God drove the nations out because of their wickedness, not because of the Israelites’ righteousness or might.
The Israelites would fight against peoples stronger and much taller than them. And they would prevail. But the Israelites’ own merit had nothing to do with their success. God would go ahead of the Israelites as a consuming fire.
The conquest in Deuteronomy is framed explicitly as a matter of punishment of prior inhabitants. The Israelites’ righteousness, indeed, has nothing to do with God bringing them to the Promised Land. Prophet who led Israel out of Egypt to the Promised Land and received the law at Sinai More reminds the Israelites that in the wilderness, God almost destroyed them twice, but for Moses’ intervention on their behalf.
The Israelites did not earn God’s favor. Instead, God simply gave it. The Israelites certainly lost God’s Grace is the unmerited gift of God's love and acceptance. In Martin Luther's favorite expression from the Apostle Paul, we are saved by grace through faith, which means that God showers grace upon us even though we do not deserve it. More at least a couple of times. It was only the actions of an intercessor who bargained for their pardon that saved them. Christians will hear a familiar doctrine of Salvation can mean saved from something (deliverance) or for something (redemption). Paul preached that salvation comes through the death of Christ on the cross which redeemed sinners from death and for a grace-filled life. More here. God’s grace is a free gift that is received by faith[fulness] to God alone.