1) The Old Testament teaches capital punishment.
Exodus 21:23-25 "But if any harm follows, then you shall give life for life, eye for eye, tooth for tooth, hand for hand, foot for foot, burn for burn, wound for wound, stripe for stripe."
Leviticus 24:17-20 "Whoever kills any man shall surely be put to death. Whoever kills an animal shall make it good, animal for animal. If a man causes disfigurement of his neighbor, as he has done, so shall it be done to him; fracture for fracture, eye for eye, tooth for tooth; as he has caused disfigurement of a man, so shall it be done to him."
Numbers 35:16-18 'But if he strikes him with an iron implement, so that he dies, he is a murderer; the murderer shall surely be put to death. And if he strikes him with a stone in the hand, by which one could die, and he does die, he is a murderer; the murderer shall surely be put to death. Or if he strikes him with a wooden hand weapon, by which one could die, and he does die, he is a murderer; the murderer shall surely be put to death.
Deuteronomy 19:21 "Your eye shall not pity: life shall be for life, eye for eye, tooth for tooth, hand for hand, foot for foot."
2) Individuals are not to carry out revenge for being wronged.
Romans 12:17-21 Repay no one evil for evil. Have regard for good things in the sight of all men. If it is possible, as much as depends on you, live peaceably with all men. Beloved, do not avenge yourselves, but rather give place to wrath; for it is written, "Vengeance is Mine, I will repay," says the Lord. Therefore "If your enemy is hungry, feed him; If he is thirsty, give him a drink; For in so doing you will heap coals of fire on his head." Do not be overcome by evil, but overcome evil with good.
3) Government is to carry out the process of punishment of evil persons.
Romans 13:1-6 Let every soul be subject to the governing authorities. For there is no authority except from God, and the authorities that exist are appointed by God. Therefore whoever resists the authority resists the ordinance of God, and those who resist will bring judgment on themselves. For rulers are not a terror to good works, but to evil. Do you want to be unafraid of the authority? Do what is good, and you will have praise from the same. For he is God's minister to you for good. But if you do evil, be afraid; for he does not bear the sword in vain; for he is God's minister, an avenger to execute wrath on him who practices evil. Therefore you must be subject, not only because of wrath but also for conscience sake. For because of this you also pay taxes, for they are God's ministers attending continually to this very thing.
Note: The main purpose for paying taxes is for law and order in society.
4) Consequences for evil are real in this life. However, God-given forgiveness is eternal.
Luke 23:39-43 Then one of the criminals who were hanged blasphemed Him, saying, "If You are the Christ, save Yourself and us." But the other, answering, rebuked him, saying, "Do you not even fear God, seeing you are under the same condemnation? And we indeed justly, for we receive the due reward of our deeds; but this Man has done nothing wrong." Then he said to Jesus, "Lord, remember me when You come into Your kingdom." And Jesus said to him, "Assuredly, I say to you, today you will be with Me in Paradise."
Note: Have you asked Jesus Christ for the forgiveness of your evil thoughts and actions?