You should not think of a soul as some quasi-physical thing, that is then "put inside" the fetus' body, or whatever, as this is a limited way of seeing it.
The soul is not physical, and does not follow physical laws like "moving somewhere".
Think of the soul of an individual as an incredibly long, unique pattern, similar to a complex line of code. This, when you die, is "copied" somewhere in a way, in a dimension that is completely non-physical. It is hard to picture, but analogies can be made to how digital things work.
This pattern includes everything, from our race, to our sex, to our personality traits, to our mental habits, to subconscious processes, to spiritual development, to how your Chakras develop, to more complex things that we can't fully grasp. All of this makes you, you, as this is the identity you have developed. When a new soul is born, this is something that happens "by chance", someone simply has a child and this child is not a good opportunity for an already existing soul, but it is a good opportunity for a new soul. These things are handled by the Gods, and this does answer your second question.
To answer your first, think of it not as the soul "moving into the fetus". The soul, rather, was "saved/screenshotted/stored/copied" at a certain point in time upon death (during which it resided in some sort of afterlife), and then the soul is slowly "copied over" into the material world because the fetus being developed is in the right conditions to receive that soul, due to their race, sex, DNA and chart.
Just as the body does not suddenly pop into existence, so does the soul not do that. It gradually develops, which is something that also happens when we are alive as we live life, the soul gradually changes.