Serpent Slaying Myth
The story of the dragon slayer is one of the oldest myths we have, and can be traced to the Eurasian steppe circa 3500 BC. The famousclassic text How to Kill a Dragon traces the myth through various Indo-European poetic traditions, attempting to find the "original" story as best as can be reconstructed.
Blocker of Waters
The short version of the serpent slaying myth is:
"The storm-god/hero slays the serpent and releases the Waters."
Where "the Waters" is a stand in for wealth. In the pre-agricultural steppe societies of hunter-gathers or herders, knowing where water existed was a pre-condition for life. The Neolithic and early Bronze Age steppe peoples couldn't live in the deep steppe, as shown by recent research that shows no close genetic link between the upper Volga and upper Dnieper hunter gathers pre-domestication-of-the-horse.
We can see echos the importance of fresh water in Proto-Indo-European culture in the Greek nymphs and Vedic deification of rivers.
So if you buy Water as a stand in for Wealth/Gold, then Dragons have horded gold literally since the beginning, from the oldest dragon story we have.