So, the book of Job. Paraphrasing.
God and Satan are sitting together in Heaven. God says "Look at my servant Job, he loves me so much, he does his sacrifices, he worships me constantly." Satan says "Of course he does, you spoiled him rotten with children and riches and stuff. I bet if you kick him in the teeth a few times he'll turn on you, because that's how humans are."
They have a bet. No stakes, mind you, just a gentleman's wager. Satan destroys Job's life. Plagues, famine, all of his children dead. He's a caricature of misery, wallowing in sorrow, rags soaked in pus and bitter tears. He can't figure it out. He's lived his entire life as a righteous man, blessed by God, then one day God just kicked him in the teeth.
Eventually God shows up. Verse 38 (https://www.biblegateway.com/passage/?search=Job%2038&versio...) God spends the entire chapter answering, in essence, "I'm God. Who are you to question me?" An interesting part of this chapter is that, if one takes it seriously, it strongly implies that God is in direct control over everything - no free will, no randomness.
Romans 9:19-24 is also interesting, spelling out in no uncertain terms that, yes, God does predetermine everything, including moral choice. And he punishes the sinful, despite making them sinful.
"One of you will say to me: “Then why does God still blame us? For who is able to resist his will?” 20 But who are you, a human being, to talk back to God? “Shall what is formed say to the one who formed it, ‘Why did you make me like this?’”[a] 21 Does not the potter have the right to make out of the same lump of clay some pottery for special purposes and some for common use?"
"22 What if God, although choosing to show his wrath and make his power known, bore with great patience the objects of his wrath—prepared for destruction? 23 What if he did this to make the riches of his glory known to the objects of his mercy, whom he prepared in advance for glory— 24 even us, whom he also called, not only from the Jews but also from the Gentiles?"
Again, the answer isn't that God is perfectly just, or perfectly loving, but simply that God has the right to do what he will with his possessions. God will kick a righteous man in the teeth on a dare if he wants to. Pray harder n00b.
The problem is the Abrahamic canon is so old that parts of it predate Judaic monotheism (see parts of Genesis referring to God or the council of Gods in the plural, or the commandment "thou shalt not have any gods before me.") The image of God and his nature evolves with religion and society, and eventually God's nature contradicts itself. Modern Christians have to reconcile their morality with the parts of the Bible that openly condone slavery and genocide, and Paul's sexist BS. Why would an all loving, all benevolent Father talk about dashing infants against rocks and sending rape gangs against his enemies?
Because 4000 or so years ago, back when people collected the foreskins of their enemies in jars as wedding gifts, that's exactly what one would expect of a just God.
Don't bother trying to square the circle. The Bible isn't a singular coherent narrative planned out from beginning to end, it's thousands of years of poetry, prose, legal documents, mythology and insane fever dream, and it contradicts itself in many, many places. If you approach it not as a divinely inspired book spelling out the absolute, immutable truth about who GOD is, but as an account of generations of people trying to reconcile their belief in the divine with reality, and coming to radically different conclusions, then the paradox resolves itself.