The world will always cite the OT when they want to accuse God. It's simply that they do not understand what was going on. Without going into too much detail, I would mention that the covenant (promise) started first with one man. The promise was then brought to fruition, and a covenant with the descendants was made - a covenant of law. Law states the vast gap that occurred in the beginning with Adam & Eve. At this point the spiritual significance (types and shadows) of this law was being brought to them externally. In Heb 9, it states "According to this arrangement gifts and sacrifices are offered which cannot perfect the conscience of the worshiper, but deal only food and drink and various ablutions, regulations for the body imposed until the time of reformation." This was a step forward giving the Israelites some understanding about uncleanness versus purity (discerning between the clean and the unclean). It was the type and shadow which our Lord would then make this external physical example to the internal heart of man, hence, the New Covenant. God always does everything in it's proper order. He doesn't do things without an orderly revealing of His plan. I know it's hard sometimes to grasp the "why" of the process that He takes, but it is all being done perfectly. First the promise, then the external example, then the heart of man.
Some millenia ago, a man named Job struggled with this question too.
God’s answers to him are very humbling. Just read the last chapters of Job’s book.
Who are we to judge Him? How can the pot call the Potmaker out? (Isa. 29:16)
Still, God loves us so much, He wants to communicate with us, redeem us and bring us into His everlasting glory. (John 3:16)
What an awesome, loving, caring, good benevolent God we have.
There's nothing cruel in this. Everything that God did was according to the covenant made. If one was to read the outlines of the covenant God stated that according to that law they must do this and He would respond according to stated law. The Lord always abode by that covenant; He never departed from His commitment to it. Rom 3: "Let God be true though every man be false...."
Man always relaxes law, he always lessens penalties, he never and can't perfectly adhere to a vow or commitment. We see that today in our courts and other places. So man is always going to insist that God is unfair or harsh because man isn't able to hold the line himself. Corruption always violates law and vows uttered. Prov 16 "All the ways of a man are pure in his own eys, but the Lord weighs the spirit."