I'm curious with the fact that the sixth commandment says, that one can't kill the other, this is (Exodus 20:13):
13 “You shall not murder.
However, in the bible, there are many moments where this is permitted, as it seems to me, as in Exodus 21:12, 22:19,Leviticus 20:10. And it's in the New Testment (Romans 6:23):
23 For the wages of sin is death, but the free gift of God is eternal life in Christ Jesus our Lord.
I know that death penalty in some cases can be permitted in Torah and also others that can't, as Jesus was in John 8:1-11 trying to balance the situation between those that want to stone a woman but they have also many sins. So the question is: how to judge correctly (which parameters) if a case deserves death penalty and those that don't?
obs.: this question differs from others because I want to know if death penalty in the Torah can be applied under certain circumstances (which) and not just about being intentional or not murder.
In addition, I'd also like some examples in the Torah where this is permitted and where this is not.