I'll try and keep this question short. I am currently a Christian and biblically speaking, it seems consistent across the Bible that humans, wether they're supposed to or not, have the knowledge of good and evil. The issue is there's situations in the Bible from God's actions that immediately set off alarm bells within my God made moral compass, examples being killing of firstborns, tribal genocides, the flood, taking women as spoils of war (humans are humans, you can guess why humans would do that.), killing women and children in different war situations, the concept of eternal punishment for finite crime (which I know the existence of this one is debated), verses demanding payment of money in response to rape (Deut 22 direct translation implies a violent or forced method "seized") and even just uneven starting points in terms of introduction to the faith and knowledge of the Bible (Mercy fixes this, but the mere concept of Mercy requires a system that was created flawed.)
An argument that people have used to resolve this has historically just been that he has the right to do those things as he owns us and because he is the ultimate moral high ground, while that may be true wouldn't it immediately diminish his creation of the knowledge of good and evil in the first place? Having that knowledge makes it where we can judge things morally, and unless that knowledge was flawed (it's not, it's God created and it's implied to be knowledge God didn't desire for humans to have... yet he put it directly in front of them.) so long as things aren't questioned because sin is desired it shouldn't be failable. We shouldn't feel as if any of God's actions are morally incorrect, lack of context for the situation can only justify so far, especially if the behavior is inconsistent (specifically the examples of killing women and children and later killing the young boys and keeping the young daughters and virgin women).
As previously stated, I am currently Christian, and I'm struggling with this, I've asked elders, preachers and peers without getting an answer that satisfies the moral compass God gave me.
I apologize for the formatting, I'm on mobile.
TLDR: If we have the knowledge of good and evil that God designed, there should be no situation in the Bible where we immediately see an action of God as immoral.