This doesn't show that though. You have to examine the counterfactual: would the crime rate be even higher without the death penalty? If yes, it is a deterrent.
How can one examine a couterfactual in cases like this? Barring access to Marty McFly’s time machine unless you have two identical copies of a state to experiment on how would you go about this?
Edit: legitimately curious, not trying to be nitpicky
Generally the best ways to analyze the impact of similar social changes is to compare two similar locations, one that makes a change and one that doesn't, over the same time period, and hope that controls for broader social change.
Edit: legitimately curious, not trying to be nitpicky