So I noticed my parents home has this strip with these pins fallen off and disappeared, likely into vacuum cleaner and impact. Whst is it and how to fix them?
If the strip is loose you could finish pulling it up so as to inspect the remaining nails. Get replacement nails a bit larger.
I think my carpet had one of those and it was part of the hold down for the carpet, but we replaced it with something else where I want to say it's just trim over it.
You'd be better off with screws, like JayHawkRoy said, which you can get at most any hardware store.
However, if you'd prefer nails, I'd go with brass, which can also be purchased at the hardware store.
Since you are in Silicone Valley, maybe Amazon or McMaster Carr would be more easily accessible.
It looks like you could tighten the carpet a little too (after removing that trim strip) both in the doorway and a little on either side. The edge will often be quite dirty.
I might use screws, but slightly larger diameter and longer nails should work too. And reverse the trim end for end. Reversing it will often give you new holes.
Take the nail to a hardware store and match it up against their stock. Keep in mind the new nail heads (or screw heads) have to work with the holes in the trim too - ie very similar size.