You’ve got two things: a soul and a body.
Your body is limited by its senses. You learn, you grow, you develop, you change. Your body at conception isn’t the same as your body at birth. Your body at your first birthday isn’t your body at your fifth birthday. Your body when you graduate high school isn’t your body when you have your first grandchild.
But that doesn’t mean that you’re a lesser “you” at conception than you are when you have your first grandchild, just like it doesn’t mean you’re a lesser “you” when you have your first birthday versus when you graduate college. You’re just different-- in your experiences, in your understanding, in your development, in your role in life, in your capacity to think things through and make judgement calls.
But your “self” doesn’t hinge on your ability to think things through or make judgement calls— or else there’d be a whole lot of adults with poor decision-making skills who would be in trouble!
Your soul, on the other hand, isn’t limited by senses, or experiences, or maturity, or what it’s learned. So the soul of someone who’s been dead for a day isn’t much different than the soul of someone who’s been dead for a thousand years. The time for growth and development is during life— when you actively choose God, and cultivate virtue, and love, and perform acts of charity, and earn grace and merit.
So— an unborn baby has a body. It just happens to be inside of someone else’s body at this moment in time.

And so you have things like the Visitation, which indicate that it’s not beyond possibility for a baby in utero to be just as spiritually engaged (in whatever way God dictates) as a scholar who’s studied his whole life. Because didn’t the unborn John the Baptist recognize Jesus, whereas the Pharisees and Sadducees couldn’t?
But once you die-- and once you no longer have that earthly body-- there’s no more spiritual struggle, because you see things as they are. There’s no more desire to choose evil because it’s been disguised as good. You’ve had your chance to pursue virtue and accumulate merit. And that’s why it’s such a terrible thing to cut someone’s life prematurely short— because you rob them of that opportunity to accumulate spiritual treasure.