This is not my belief but teachings from well established Abrahamic religions that I’m familiar as well as supported in biblical writings. God is good. PERIOD! I.e. A thing is good because God says it is good. A man is righteous because he obeys the commandments of God. Good is objective, not subjective. And it is whatever God says it is. And yet most 12-year-old, even Christians, would tell you that many of the things God does and commands us to do are immoral.
EXAMPLES
if you told a child that someone was going to do what you wanted them to, but you hardened their heart so that they changed their mind, for no other reason then you can beat them up and glorify yourself and look big in front of the everybody else, the child would say that was evil. And yet that is what God did to Pharaoh. And it was good, by definition.
if you told a child that someone commanded an army to go down to the valley and put every man woman and child to the sword so that none remain alive, so they could not come back later and reclaim their land, the child would say that was genocide. Yet that is what God commanded Joshua to do. And it was good, by definition.
if you told a child that someone set the devil loose on a man, and let them kill everything they had, including a score chidren, and destroy everything they had ever had, just to make a point that the man still wouldn’t badmouth him but would continue to bow down before him, the child would say that was inhuman. Yet that is what God did to Job, and it was good, by definition.
if you told a child that someone had killed 130,000 innocent people, because their king had wanted to know how many people he ruled, and had counted them in a census, the child would be horrified. Yet that is exactly what God did when David counted the Israelites. And it was good, by definition.
On second thought I guess the child wouldn’t think these were bad things, if you told the child regularly and consistently, they would be next, or burn in hell, for thinking they were bad things. This is one of the reasons I reject any of the biblical religions.