Why does God order the wiping out of nations in the OT? Isn’t He a God of love? Deuteronomy 2:1-3:7

Why does God order the wiping out of nations in the OT? Isn’t He a God of love? Deuteronomy 2:1-3:7