3-level Conjuration (ritual)
The caster rolls a Wisdom check (DC10 for Simple, adding 2 for subsequent soul levels) to imbue an inanimate object like a prepared golem or corpse with a captured soul. On a failure, the soul escapes, and becomes an incorporeal undead or spirit elsewhere, leaving the jar empty, and requiring the subject of the animation to be destroyed and reassembled before another attempt can be made. On a success, the soul inhabits the target. The newly animated target will be obedient to the caster to the best of its ability, unless animated with the soul of another creature, which will act however it did previously.
At higher levels: Each subsequent soul level will require higher subsequent spell slots to even attempt imbuement.