In the old testament of the bible, that being known as God was a mean-spirited sort. Always eager to smite someone - especially if they don't didn't obey the rules and regulations which had been given.
You're putting the cart before the horse. God does what He does and humans just try to figure out rules and regulations to avert trouble. When they are successful, the humble ones attribute it to revelation/forewarning from God, and heeding that revealed foreknowledge results in better outcomes than ignoring it.
It's like if your parent tells you not to cross the street without looking both ways and you heed the advice and don't get smashed crossing the street.
So it's not that God punishes you for not obeying rules and regulations, but that if you don't get and heed the good advice available to you by whatever channels, then you are going to end up reaping the consequences of failing to do so.
This God was not particularly likeable, much less loveable.
God is the power behind all existence. Whether you like/love Him or not depends on whether you can accept and like/love existence. The problem is you can't ultimately hate existence without making yourself more unhappy/miserable, so there is the blessing that comes with loving God and thus experiencing the universe and all that exists as containing and transmitting love in various ways.
Love is a good thing so it is better if you accept it as part of the same universe that contains hate and all the misery that comes with that.
Yet, it was required that everybody obey...or else! By new testament times, God seemed a little nicer most times...well, other than the continued stonings, famines, droughts, trying to get his alleged child killed.
Yes, they discovered that "the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord." Note: the wages of sin didn't stop being death because of the discovery of eternal life in salvation.
Why couldn't o.t. God have been that way?
It was in many ways. God put a rainbow in the sky after the flood of Noah to symbolize He accepts that humans have a sinful nature and won't destroy them as a species.
The world is in a dynamic state of tension between sin/destruction and rebirth/salvation.
When we discover/accept salvation from the sin we can't escape, we realize that there is no conflict between the God who created the sinful world and the same God who forgives us for our role in the sin and saves/delivers us from its hold on our spirit.