Killing somebody even when it's a criminal is still killing. I can understand you sometimes cannot avoid killing. If somebody tries to kill you, you may have to, but when it comes to an execution, you basically kill somebody who has no more means to defend themselves.
I am also not sure if capital punishment actually works the way it is intended to work. That is to prevent people from commiting crimes. I think the opposite is rather true. A criminal whose life is on the line can become very extremely dangerous. And frankly can you blame them? Anyone whose line is on the line will rely more and more on survival instincts rather than ethics. Overall countries still having capital punishment do not have lower crime rates than countries that have no capital punishment... Mostly even higher. Now people are discussing if the death penalty is there because of the higher crime rates, or if the crime rates are higher because of and not in spite of the existence of the death penalty.
Another thing is, when somebody serves a life long sentence in jail but turns out to be the victim of a miscarriage of justice, you can still release them and try to compensate them. When somebody is executed and turns out to be the victim of a miscarriage of justice, then you have a problem, since death cannot be undone. And even if you could undo death, I am not sure if it's a wise thing to do, as the wrongly executed person will likely be traumatized for the rest of their lives in unimaginable ways.
All-in-all... I am against the death penalty... It doesn't solve the problem we call "crime", and there are also too many other issues, and I've also some ethical problems with the entire phenomenon.