The tag on this is mythology, not hard science. You need to think mythologically.
How could garlic, a spice whose only offense is plain stink, deter an attractive man with a seriously unhealthy diet, as opposed to more potent spices like pepper or azalea?
Garlic is cleansing. The flavour is refreshing, crisp, and clean. (I’m thinking here of the flavour of the leafs and flowers of wild garlic, or perhaps a raw garlic bulb.) It is not surprising that it should come to be seen as a ward against evil, especially an unclean, putrid evil like a vampire/zombie (the two are pretty much the same in early mythology; only recently has the vampire become aristocratic and attractive).
Why does silver kill a canine-like hominid whereas lead and mercury are known to be more deadly metals?
Well, lead and mercury are not known to be deadly. Lead, in particular, is common in plumbing (hence the name, in fact). Quicksilver is important to alchemists (they believe it is the most important of all substances because it encompasses solid and liquid, earth and heaven, and life and death), but I doubt that the common folk know much about it. Certainly neither metal is known to be poisonous.
Besides, that’s irrelevant. What matters about silver is again its purity: it doesn’t tarnish (it does these days, because there’s a lot more sulphur in the air than there used to be; make of that what you will). A metal which doesn’t tarnish is pure, and hence a ward against evil.
Remember, while official Christian doctrine may have no place for vampires and werewolves, that doesn’t mean that European mythology was a completely separate strand of thought. The learned men of the Church may not have believed in these folk, but those who did believe also went to church on Sunday. Therefore, mythological creatures were fitted into Christian theology. (By some tellings, the fairly folk were the third group of angels: those who sided with God remained in Heaven, those who sided with Satan became devils in Hell, and those who did not pick a side were thrown down to Earth and became fairies (or seals, if they landed in the water).)
Vampires and werewolves, unlike fairies, are actively evil, and must therefore be in league with the Devil. A horseshoe or cold iron might work against elves, but for actual evil what you need is a symbol of purity. It has nothing to do with poison.