I honestly never understood the difference between a soul and a spirit honestly.
Depending on which reallife nomenclature you are using.
• The soul (nefesh, psukhe, chi) is the bodily lifeforce. So, animals have souls, for example.
• The spirit (ruakh, pneuma, hugar) is the emotional and intellectual inner life of a person, the self-identity, often understood as a kind of personal mental force. So, the spirit of a pep rally, is a kind of presence of emotion, intellect, and self-identity.
In some traditions, there is a higher level of a persons life, involving pure consciousness (neshama, atman), being the best version of oneself, ideal altruistic and eternal. Even a higher level transcends the sense of a particular self, and encompasses all beings as aspects of oneself (khaya, anatman). And some traditions relate there is an aspect of a human that has never separated from the divine infinite (ykhida, brahman).
The first two levels, ‘soul’ and ‘spirit’ are the aspects of oneself that people normally exhibit in ordinary daily life − the sense of a self as being a body and an inner life. The higher aspects are more existentialist and the discussions of mystics and philosophers.
Because the term ‘soul’ is often used to mean all these levels of a person, and because the term ‘spirit’ is used to mean many different kinds of things, these terms are often used in ambiguous ways.
In reallife folkbelief, elves are nature spirits (of fate and fertility). To claim that elves lack a ‘soul’, is the same thing as saying they lack a physical body, and obviously cannot physically resurrect. To claim that elves are a ‘spirit’ means they are an emotional-intellectual presence.
In D&D, heh, I doubt D&D really knows what it is talking about when using these terms. In the 1e Greyhawk setting, the terms probably mean that human ‘souls’ go to a celestial plane or an infernal plane after the death of the body, while elf ‘spirits’ keep on showing up in the material plane, via reincarnation.