The spirit or the [ethereal] soul forms inside the material body, and grows as long as the
body grow

It gets bigger and bigger gradually until it
becomes a hearing, seeing, 'conscious and thinking' soul that cannot be influenced by any
defect or disturbance

When the body of the fetus is formed inside his mother's womb, it will start to draw to it the ether particles and construct inside it[s body] an ethereal structure, that will be a true copy of it, and will go on attracting the ether to it from the time of its birth until the end of his youth, when it will not be able anymore to attract the ether to it, and the soul reaches its limits and will not become bigger afterwards.

God - be exalted - said in the Quran 23: 12-14
ولَقَدْ خَلَقْنا الإنْسانَ مِنْ سُلالَةٍ مِنْ طِينٍ . ثُمَّ جَعَلْناهُ نُطْفَةً في قَرارٍ مَكِينٍ . ثُمَّ خَلَقْنا النُّطْفَةَ عَلَقَةً فَخَلَقْنا العَلَقَةَ مُضْغَةً فَخَلَقْنا المُضْغَةً عِظاماً فَكَسَوْنا العِظامَ لَحْماً ثُمَّ أنْشَأْناهُ خَلْقاً آخَرَ ، فَتَبارَكَ اللهُ رَبُّ العالَمِينَ
The explanation
(We created man, from [his] ancestors, from clay.
Then We made his [offspring from] a scanty liquid [: the semen, to settle] in a sure [or safe] lodging.
Then We created the scanty liquid [: the semen]: a worm[-like structure], and created the worm[-like structure]: a morsel[-like lump], then created the morsel[-like lump]: bones, and clothed the bones with flesh; then We formed it another creation, so blessed be God: the Best to create.)

So His saying – be exalted – ثُمَّ أنْشَأْناهُ خَلْقاً آخَرَ i.e. (then We
formed it another creation) means other than what He has created initially: that He created it of mud then of semen …etc.

, the first creation is material, and the 'other creation' is ethereal; He means by that the soul.
The indication of that, is His saying – be exalted – ثُمَّ أنْشَأْناهُ i.e. (then We formed it), but He did not say: then We created it; because the 'creation' is for material things, and the 'formation' is for the ethereal, i.e. souls. Therefore, the word 'formation' [and its synonym in Arabic: إنْشاء ] means the collection, gathering and attraction.