I gather that according to Roman Catholicism, each soul is
separately created by God and then installed in the embryo.
Therefore it's God's problem to settle. (To be clear,
I'm an atheist and I don't believe in souls.)
This supposedly occurs at the instant of fertilisation,
or possibly insemination (which may be whole days before
sperm meets egg and then fertilised egg finds its way
to stick to the lady's inside: it seems that they often
don't.)
So the soul of an in vitro embryo might arrive at
fertilisation, or when and if the embryo is put inside
a lady. I don't remember whether Rome has decided
whether embryos in test tubes have souls, apart from
saying that in vitro fertilisation is wrong anyway.
Other religions teach that a soul is your self and it
continues to exist when you die, but they may not be
specific about where it came from in the first place.
In some religions, after you die, your soul gets
reincarnated into another body, which may be a human
or an animal; this accounts for where most souls come
from, they are pre-owned. It may also imply that either
souls wait between lives for a conception to happen,
or else conception depends on a soul being available
for the embryo. Good luck testing that in the laboratory.
If you don't think about it, you may suppose that a soul
just sort of grows out of you.