Yeah but the immediate cause of death will be something else.
As an example, smoking generally does not kill you. It prepares your body to be trivially killed a by a plethora of other things, such as cancer or 2 tons in the face when you were distracted while driving because your cig fell into your lap. But the smoking itself isn’t the proximate cause of the death.