I've often seen people say that the idea of dragons came from knights and sometimes peasants discovering dinosaur fossils. Is there any historical evidence of that happening?
Information in this is for England, France, and Scandinavia in the High Middle Ages. It's pretty likely accurate across the rest of Europe too, though.
TL;DR: It is very unlikely that a knight would have discovered fossils. It is possible that peasants might have done so.
To expand on that a little further, knights were minor nobility. The idea that they spent their time riding around in armour on quests is a Victorian romantic notion, rather than anything in reality. They were land-holders, administrators, local rulers, and dispensers of justice. As such, the amount of time they spent in circumstances where they might find dinosaur-bone fossils was very, very low indeed - about equivalent to the chances of a 21st-century office worker doing so.
Peasants, on the other hand, worked on the land almost by definition. They would not in their day to day work have had much chance to discover anything new, as they would rarely have travelled far from the place they were born, and spent most days engaged in field or forest labour (except in the depths of winter, when they got a bit of a break, but would have spent it indoors).
However, there was fairly continuous quarrying work to be done, and this would mostly have been carried out by peasants (but probably not as what we'd think of as full-time work). Where this work was in the right kinds of sedimentary rock, there is a reasonable chance that they would have come across fossils of just about any kind. It is entirely possible that they invented stories about these, but none have been recorded directly, as the lives of the peasantry went almost completely unrecorded. This makes answering any question about what the peasants did difficult, as we only have what elites wrote about them, alongside physical remains.
It's also worth noting that depictions of dragons in the Medieval era in general are of much smaller beasts than the modern fantasy kind; barely bigger than a large crocodile or alligator. If you do an image search on Google for something like "St George dragon medieval", you'll see a variety of images of the saint on horseback striking downward at a large lizard. So it's not clear that anyone finding dinosaur fossils would even make the connection to dragons as they were depicted. Generally speaking, they might guess that they were the remnants of creatures from before the Biblical flood.
Sources
Barbara Hanawalt, The Ties That Bound: Peasant Families in Medieval England, 1989
Eva Svensson, The Medieval Household: Daily Life in Castles and Farmsteads: Scandinavian Examples in Their European Context (Medieval Countryside), 2009
Philip Schofield, Peasants and Historians: Debating the Medieval English Peasantry (Manchester Medieval Studies), 2016
MJS Rudwick, "Encounters with Adam, or at least the hyaenas: Nineteenth-century Visual Representation of Deep Past". In History, humanity and evolution: Essay for John C. Greene (ed. Moore, J.R), 1989.