We understand the meaning of a term from within the context of the passage.
Ephesians 2:1-7
And you were dead in your trespasses and sins, in which you formerly walked according to the course of this world, according to the prince of the power of the air, of the spirit that is now working in the sons of disobedience. Among them we too all formerly lived in the lusts of our flesh, indulging the desires of the flesh and of the mind, and were by nature children of wrath, even as the rest. But God, being rich in mercy, because of His great love with which He loved us, even when we were dead in our transgressions, made us alive together with Christ (by grace you have been saved), and raised us up with Him, and seated us with Him in the heavenly places in Christ Jesus, so that in the ages to come He might show the surpassing riches of His grace in kindness toward us in Christ Jesus.
by nature children of wrath
Paul compares and contrasts our former life walking in sin, with our current life walking with Christ. In that context, he mentions three distinct aspects of our walking in sin: we were "dead" in our trespasses and sins, we walked according to the course of this world, and we were, by nature, children of wrath. Given these three aspects, what can it mean to be "dead"? Obviously, Paul is using the term "dead" in a figurative sense. Those who are literally dead can't walk at all, let alone walk according to the course of this world. Even here we have two plausible options for what Paul might have meant: 1) Prudence, or 2) Death sentence
Death Sentence:
Dead = sentenced to death. According to the New Testament, death is the just penalty for sin. Death in the figurative sense can describe the end of something, such as a relationship, a career, or a phase of life. It can also be used to describe a feeling of emptiness or loss, such as the death of a dream or hope. Finally, it can also be used to indicate capital punishment, which is to take place at the final judgment. Ultimately, Paul says, we were by nature children of wrath.
Alive = pardoned. To be alive, in this sense is to have one's sins forgiven, to be pardoned, and to be set free from death producing activities. Those in Christ will implement a course of action consisting of "Life-giving" activities. Life-giving activities are actions that promote a sense of well-being, happiness and fulfillment: volunteering, self-care, creative pursuits, spending time in nature, and connecting with others. These are among the many life-giving activities available to those who follow Christ and live according to the course that he sets for our life. We are not only freed from the death penalty; we are free to practice beneficial and rewarding activities that promote life.
Prudence:
Dead = Ineffectual. Our evaluation of the effectiveness of a particular course of action is based on the aim or goal we have set for ourselves. As human beings, we all strive for peace, prosperity, well-being, fulfillment, and human flourishing. In order to achieve these desirable conditions, we need to implement a specific course of action. The question is, what steps or actions should we take to attain these beneficial ends? "If someone chooses to follow the ways of this world, which are controlled by the ruler of the air, they have chosen a path that is pointless, ineffective, fruitless, and futile. Those who walk according to this world are unable to achieve true peace with God, prosperity, or well-being. Their way of life is essentially dead and cannot lead to human flourishing."
Alive = effectual. If someone chooses to follow the ways of Christ, he leads that individual in the course of action that will eventually result in an effective means to gain peace with God, human flourishing, well-being, and human fulfillment.
Either Paul was talking about "prudence" or he was talking about pardon. He wasn't saying that a spirit was dead.