The way that teachers and scholars and students have discovered the difference and meaning of "soul" and "spirit" is by looking every occurrence of these words in the Bible. When you see how the "soul" operates, you get a better picture of what it is. Same with the spirit and body.
For example:
From just one verse, we can deduce that the soul contains knowledge. Of course these principles will be consistent throughout the Bible because it is flawless.
Here's a supporting verse or 2:
The proverbs verse not only corroborates the psalm, but it also offers understanding of the heart and its function and what it can receive. This is extremely extensive topic that I won't go into here. But If you look at
every time body, soul, spirit (and their synonyms), you can see a clear distinction between the three and also understand their functions. Sometimes terms are used interchangeably to make a poetic point.
From the verses above, we can see that knowledge resides primarily in the mind, and wisdom resides primarily in the heart.
heart is usually the synonym for spirit
mind is usually the synonym for soul