Hephaistos (or, as the Romans would have written his name, Hephaestus) of the Greeks and Vulcan of the Romans were metal-working gods. Hephaestus was said to be rather ugly, and a cripple; but they were not dwarfs by any measure. (Hephaestus managed to arrange it so that, ugly and crippled as he was, he ended up married to Aphrodite, lucky god as he was.)
Hephaestus giving the arms of Achilles to Thetis by Anthony van Dyck (17th century) on Wikipedia.
The dwarfs of fantasy novels are modeled after the dwarfs of western European folklore, mostly of Germanic origin, and those dwarfs are miners and hoarders of treasure; for example, the dwarf Alberich from whom Siegfried stole the Nibelung treasure. (In Wagner's opera cycle, the Nibelungs themselves are dwarfs.)
Now they being miners they naturally lived in the mountains, because in western and central Europe most mines are in mountainous areas. See, folding mountains are usually less rich in minerals than volcanic mountains, but usually does not mean always and anyway volcanic mountains are usually dotted here and there in the folded ranges; and the mountains are almost always richer in minerals than the plains.
For example, in central Europe there are the Ore Mountains, which have the richest silver deposits in Europe, and which have been mined since the middle of the 3rd millennium before the common era; there, in Joachimsthal, beginning in the 16th century, were minted the well-known silver coins named joachimsthalers, a name first shortened to thaler and later mangled into dollar; there, in the 16th century, Georgius Agricola wrote his famous book De re metallica, the first serious book about mining and minerals written after the fall of the classical civilization. A very good place for a tribe of dwarfs mining precious metals, isn't it?