A human consists of three parts: body, soul and spirit.
Body is physically made in the womb, the physical attributes are a person's body, their "mind", represented by the HEART.
Soul is given at conception It's the essence and nature of a person is their soul their "self". A "selfish person" is called a SOULISH person, always satisfying the desires of their own flesh first. It's represented by the STOMACH (afflicting your soul is fasting).
Spirit is the motivation of a person, their "drive" or "passion". A familiar spirit is given at a persons FIRST breath from exiting the womb, from the people present at the birth. A familiar spirit is removed or maintained based on a persons way of living - unrepentant sinners will eventually attract unclean spirits (demons) with their familiar spirit and if welcomed, beget wickedness generation after generation. However the repentant will forsake their familiar spirit (and unclean spirits) and accept a measure of the Holy Spirit and live a transformed life in obedience to the Creator.
When a person dies, the body is physically destroyed, soul is put into "storage" (sheol), while the spirit returns to it's source - either wandering in the wilderness, occupying animals, seeking a new host... or the measure of the Holy Spirit is returned to God.
At the judgment, bodies are restored, souls are put back in place from storage (sheol) and the spirit is reserved for after the judgement. It is given based on the judgement - the unrepentant are condemned and assigned their familiar and/or unclean spirits and are destroyed in the lake of fire, the second death. The repentant and regenerated are restored the measure of the Holy Spirit, but in greater quantities, they are saved for an "eonian" life lived in holiness as part of the restoration of all things, the Reign of God.
This is why Yeshua proclaimed "Repent, the Reign of God is near."
I believe that what we call "ghosts" are the wandering spirits that are not from the Most High God. They have many memories and personalities of various people they have possessed, they roam around looking for someone willing to open themselves up to possession. They coordinate and conspire together to created a depraved world, operating in secret and manifesting in world systems, "education" and governments.
Everybody has a measure of the Holy Spirit reserved for those who are made clean and ask for it - this is the only way to remain untainted by unclean spirits, being occupied with Holiness by the Spirit from God. Too many people either grieve the Spirit, or reject the Spirit, or are unrepentant and incompatible with the Spirit, so they are opened up to "ghosts" and demons that occupy that open space.
It's not enough to simply avoid "ghosts", they will find anyone who is willing to be occupied with them and they will have influence in a person's life.
Wow this was long 😅
Well if there are indeed wandering spirits then it means that there are ghosts.