Emiya Shirou's physical body was completely destroyed.
Existential invasion by Archer's arm, circuits completely destroyed by using projection that surpassed his limits.
That was "death" at a level that even the Holy Grail couldn't undo.
But even still, that's because the Shirou that's bouncing around over there is a "copy".

Ah, not quite. That isn't really right either.
Anyway, Shirou's body died.
That Holy Grail didn't have the ability to restore a destroyed body.
What the Holy Grail, what Ilya could do, was only the mystery called the Third Magic.
Using that, she somehow brought back Shirou's soul.

Revived it and gave it an undamaged vessel.

What the fudge! I know, but that's because it's the Third Magic.
It's not the transmitting of just a spiritual body, the consciousness, into the brain of another person and putting it under its domination.
When souls materialized by the Third Magic are granted a vessel having proper human capacities, those bodies will be completely reconstructed in the "form of the soul".
Not the genes of the body, but the genes of the soul.
Ilya saved Shirou's soul and revived "Emiya Shirou" by putting it in a vessel that had yet to become anything.

...But that, was kind of incomplete, or maybe Ilya's Third Magic wasn't able to match the original perhaps?
Several days after the collapse of the cavern, the Shirou that Rider found was just a weeeeeeeeeeee bit different from the original.

....Ah, not so much as found, or picked up, or maybe grabbed would be the better way of saying it.

In the beginning, well, we were completely knocked flat down. Yeah oh so very much surprised by the logic behind that.

But if you think about it, the Shirou cooking over there is something that the "existence" that's called the soul, is controlling by remote from long distance in order to interfere in this world.

Memory, the brain, circuits, all of that stuff is really in the area of the soul instead of the body.
So you see, the vessel is just a terminal for movement functions and the chain of command is in "that" world, in invincible condition.

...Well still, we had to go through some trial and error in the first half year.
It's not like it'll grow if we poured water on it and we didn't have the facilities to make a homunculus.
So, in the end, we sold all the books that the Matou had to the Association, got our hands on a body that a renowned puppet master left bhind, and finally got up to the current condition.

...Now this isn't quite the right way of saying it, but Shirou is just like us, a normal human being.

He can receive surgery at a hospital, take medicine, and die if he's killed.
If the soul's put in a body, in exchange for recreating the soul with the body, it'll be anchored to it.

Basically, he's like a Servant that can move around without a Master.
The only difference is that he's living in this era.
He can get bigger, knock on heaven's door once he drops dead from old age, etc. So that's him, the guy making delicious food rght now, the same old Emiya Shirou.