Yes, it's folklore. But by the time it reached gaming, "cold iron" had developed a number of different origin-stories.
My preferred origin-story is that gold, silver, copper, and lead can be hammered into shapes while "cold" (room temperature) but iron was a "new metal" that had to heated up...