19 Beloved, never avenge yourselves, but leave it to the wrath of God, for it is written, “Vengeance is mine, I will repay, says the Lord.”
20 To the contrary, “if your enemy is hungry, feed him; if he is thirsty, give him something to drink; for by so doing you will heap burning coals on his head.”
21 Do not be overcome by evil, but overcome evil with good. (Romans 12, English Standard Version)
Second, doing good to those who do evil against us can bring about the end of their evil. This does not always occur, but as we saw in Romans 12:20, people who have done wrong are often shamed when we do not repay them in kind, and they stop mistreating us. The Holy Spirit can even work in this to bring about the repentance and conversion of our foes. John Murray writes in his commentary Romans, “By well-doing we are to be the instruments of quenching the animosity and the ill-doing of those who persecute and maltreat us.”
Overcoming Evil with Good. https://www.ligonier.org/learn/devotionals/overcoming-evil-good/. Ligonier Ministries.
I cross referenced this with 1 Peter 3:16 [a letter in the New Testament Bible, English Standard Version]
16 having a good conscience, so that, when you are slandered, those who revile your good behavior in Christ may be put to shame.
There was a similar sermon in 2005.
Paul’s call to us Christians to love our enemies (in Romans 12:20) and to overcome evil with good (in Romans 12:21) is based on what Christ did for us. Christ loved his enemies, and (in that way) he overcame evil with good. Not one of us would be a Christian if Christ had not loved his enemies and overcome our evil—our insubordination and willfulness and self-centeredness—with his great good—his death and resurrection.
John Piper. (20 Mar 2005). Christ Overcame Evil with Good—Do the Same. https://www.desiringgod.org/messages/christ-overcame-evil-with-good-do-the-same. Desiring God.