Thank you for the question on the nature of God, “How can I be sure that god is a benevolent entity after reading the Old Testament?”
As one reads the Old Testimony, the question becomes this, “Am I letting the biblical speak for itself or am I reading into the text?” Part of the answer becomes one’s view of God. Is God a “Santa Claus”, a cruel maniac dictator or a God of justice and compassion? Of course, there are other views of God. A reader may look for what one believes about God and disregard the context of God’s action.
Let’s take a few example from Genesis to see what the text says about the benevolence of God and justice.
A. Was God benevolent in creating humans in Genesis 1–2?
God created Adam and Eve in a perfect environment without any needs. He even made Adam a life companion. God forewarned Adam about the Tree of Knowledge of Good and Evil with its consequences as well as providing the Tree of Life.
One may say that God would have been unfair or unjust if Adam ate the Tree of Knowledge of Good and Evil without him being warned of its consequences. This was not the case.
B. Was God benevolent after Adam and Eve violated God’s command in Genesis 3?
God had the right to terminate Adam and Eve upon their disobedience. He did not and allowed them to live. He even made a covering for their disobedience by the death of an animal. God even gave them hope of someone from her lineage who will be able to defeat the serpent/Satan once and for all.
When Cain killed Abel, God spared his life and even gave him a special sign/marking so no one would take revenge for the death of Abel.
C. Was God benevolent in condemning the world in a Genesis 6–9?
As one reads Genesis 6, what were humans doing to each other? Was it just a few bad individuals who were hurting others, most or nearly every person? What should God do when those born innocent were eventually abused or killed by those who had no moral conscience? The innocent people cried to God for justice as there was no justice on earth. If God did nothing at all, he would be view as a careless or impotent God.
God looked into the hearts of all the people and found 8 people who strived to live a godly life. God did not sweep away the righteous with the unrighteousness. God even gave humans another 100 years to see if humans would change their ways. They didn’t at all.
Noah most likely proclaimed a coming Flood on the earth. Those who saw his ark and heard his words most likely laughed at this crazy family building this afternoon ark in nowhere. God was benevolent in giving time for man to change his ways.
I can go on with Sodom and Gomorrah that a God came down to verify that the cries were true or false. God spared Lot and his family from destruction.
As a respondent was I fair in reading the text or did I skewed the text to favor what I believed about God? One must decide for oneself and read the text again.
Summary: God is benevolent and not wanting anyone to perish. He is giving time to mankind to change their wick ways.
For more perspectives: