The spirit of man is the offspring of God
Acts 17:28-29
28 For in him we live, and move, and have our being; as certain also of your own poets have said, For we are also his offspring.
29 Forasmuch then as we are the offspring of God, we ought not to think that the Godhead is like unto gold, or silver, or stone, graven by art and man’s device.
Hebrews 12:9
9 Furthermore we have had fathers of our flesh which corrected us, and we gave them reverence: shall we not much rather be in subjection unto the Father of spirits, and live?
But there is a part of man that makes up his spirit that has always existed. It is known as the intelligence of man and is self-existent. So much like the spirit entering the body, the intelligence enters the spirit:
Doctrine and Covenants 93:29
29 Man was also in the beginning with God. Intelligence, or the light of truth, was not created or made, neither indeed can be.
Thus there is a part of you that is infinite and eternal but the creation of your spirit body occurred when you were born as a child of God.