These three chapters deal first with vengeance against the Midianites. That means that a thousand Israelites from each of the twelve tribes go conquer Midian. Who, as you will recall, are a people of Abraham. They kill all of the men and bring back the women and children. Of course, they then need to kill all of the boys and any women who is not a virgin. (Here, explicitly a virgin, not just a young women.)
Before the guidance for more genocide, we have a little story about how Gad, Reuben & half of Manasseh end up living on the non-Promised Land side of the Jordan.
My viewing of this story, and the genocidal narratives that will follow, is tempered by these thoughts. Did these events, or anything like them ever happen? What does it mean to have a tale like this told by the oppressed as compared to a similar tale told by the oppressors? If someone who is imprisoned tells you a story of when he had power, how does that hit your ear as opposed to one who is currently empowered?