Atheists love to use scriptures such as those in Numbers 31 as proof that YHWH (whom they don't even know by Name; rather, simply as "God"!) is a "mean God" because He ordered the Israelites to "take vengeance on the Midyanim" (Numbers 31:1-21); and ultimately, to "take all the booty, both people and animals...and divide it" (Numbers 31:25-54).
Thing is, those who don't know the Torah, don't realize that YHWH had a plan for His people to own what is now known as Israel, and that anyone standing in their way (i.e., the Gentiles/pagans/ungodly/those who worshiped "other gods) were nothing more than collateral damage.
This "God loves everybody equally" stuff is actually not quite true. He loves those who are HIS - those who love Him and obey His Divine Instructions in Righteousness. That was amply evident in Noah's day, when YHWH wiped out all the wicked on earth via flood!
Genesis 6:5 Adonai saw that the people on earth were very wicked, that all the imaginings of their hearts were always of evil only. 6 Adonai regretted that he had made humankind on the earth; it grieved his heart.
7 Adonai said, “I will wipe out humankind, whom I have created, from the whole earth; and not only human beings, but animals, creeping things and birds in the air; for I regret that I ever made them.” 8 But Noach found grace in the sight of Adonai. (CJB)
Those who refuse Him and His Torah - the ones who find no importance in being "wholehearted" - are considered "lukewarm" at best; and will be "vomited from Yeshua's mouth" on the day he returns to kick off his Millennium reign (Revelation 3:16).
If you know that you haven't been "wholehearted" toward our awesome Creator, I beg you to start today - because, as Scripture amply reveals - YHWH is NOT kidding around. There will be no "lukewarm" in Eternity with Him.