Some atheists pounce on how the Old Testament seems to portray God as cruel. This is a question Church Fathers (Origen) addressed as well, so it is not something modern atheists discovered.
A minority of Christians do take every account, verse, word in the Bible literally, whereas the majority note how Biblical authors used a lot of symbolism and metaphors to make their point. Bishop Barron’s eleven minute video talks about the use of metaphor in the Old Testament war stories.
Summary: The war stories, especially the ones that cruelly demand the execution of all, are used to make the point that all evil, all that is wrong, must be eliminated. He gives examples: Today would we be content if we eliminated ninety percent of pedophilia, or do we insist we eliminate it all? How about a spouse being faithful ninety percent of the time? How often in our own life do we try to rid ourselves of a major flaw yet perhaps keep a small part to play with? In the same way Old Testament authors are teaching the lesson that of eliminating all that is wrong, not accepting that leaving some of it around is acceptable.