I think you do need a little context. The Old Testament describes God as a god of justice, and that sometimes comes across as harsh. The Egyptians enslaved the Israelites and so were visited by plagues; the Egyptian pharoah ordered the newborn Israelites be killed, so the final plague is the death of the Egyptian first-born. This was seen by the biblical author(s) as justice – perhaps a harsh justice, but the crimes were harsh too.
God is also described in the Old Testament as a god of mercy, and so you have stories such as Hagar and her infant Ishmael, cast out into the desert, and God shows them mercy (and justice, by relieving their suffering.)
Rabbinic interpretation (from, say 400 BC through 200 AD) always focuses the explanation of these “harsh” acts as being strict justice.
I note that today is the Jewish sabbath, so the Old Testament experts who are orthodox Jews won’t be posting until Sunday… and Sunday night, Monday, and Tuesday this week are Jewish holidays, so they may not be posting then, either.