The differences are mostly semantic rather than definitional. That is, they mostly mean the same thing, they’re just used in different contexts.
A thing might have a soul. Persons obviously, but the word is also used to refer to inanimate objects that are the subject of design. So you might talk about the new Mazda Miata’s “soul.”
But things ‘have’ spirit. Souls are singular, spirit is collective.
Whereas if you talked about the Miata’s ‘spirit’, you’d be referring to something slightly different. Soul refers to something really really deep, core to that thing. Spirit refers to the more outward signs. Spirit is akin to energy. Soul is akin to essence.
A spirit might also refer to something like a ghost. You could also use soul to do this work, but the concept is better suited to ‘spirit’, being an earthly manifestation and at least somewhat material. You feel the spirit of your Mazda when you’re driving it, but its soul is far more intangible.