When God gave the Law to Moses there were distinctions made in the penalties for breaking the law.
For several transgressions of the Law the penalty was death. One example is murder: “But if he struck him down with an iron object, so that he died, he is a murderer. The murderer shall be put to death” (Numbers 35:16 ESV).
With some sin the punishment could vary depending upon the situation: “The judges shall inquire diligently, and if the witness is a false witness and has accused his brother falsely, then you shall do to him as he had meant to do to his brother. So you shall purge the evil from your midst” (Deuteronomy 19:18-19 ESV).
With several other sins the punishment was exile from the community: “But the person who eats of the flesh of the sacrifice of the Lord’s peace offerings while an uncleanness is on him, that person shall be cut off from his people” (Leviticus 7:20 ESV).
Jesus also made it clear that God especially despises the pain caused to children: “Whoever causes one of these little ones who believe in me to sin, it would be better for him to have a great millstone fastened around his neck and to be drowned in the depth of the sea” (Matthew 18:6 ESV).