It depends on "how original," stories about trolls under bridges go back a long way, but if we go WAY back, we get the word applyimng to many different mythical creatures:
"The term is used to denote various beings, such as a jötunn or mountain-dweller, a witch, an abnormally strong or large or ugly person, an evil spirit, a ghost, a blámaðr, a magical boar, a heathen demi-god, a demon, a brunnmigi, or a berserker."
I think that over time, and thanks to various "fairy tales," we have settled on Trolls as he mountain/riock/cave-dwellers who are turned to stone if exposed to sunlight.
Sadly, the Internet Troll multiplies when given attention. Sunlight does not disinfect social media.