Even within D&D rules, how many ranged attackers with enchanted projectiles would it take to successfully hit once or twice and deal 1 damage each before a dragon is dead? Probably one or two orders of magnitude fewer than what random European shitholes could muster to wage wars for much less legitimate justifications than a potential existential threat sitting on a fat pile of gold, that's for sure.
Even more, dragons are usually felled by parties of 3 to 8 high-level assholes who are only after money and glory. In our world people do tons of boring and dangerous shit their entire life simply because it is the job they are good at; all you need is a handful of such parties to tackle dragon-killing full-time and I doubt you will lack applicants once a concerned king offers a lifetime of gold and underage hookers for the job. In a world where
most estimates put the number of dragons in the few hundreds (not all of these dragons being equally dangerous or even adults), the dragons would be purged in a couple of decades.
Sure dragons are fearsome in person, they sometimes possess human-like intelligence and have terrifying powers, but their solitary nature is their downfall. If you are an animal and a human collective has decided that you should die, you're fucked. Humans routinely eradicate entire ecosystems
accidentally, indeed have been doing so ever since they realized that sticks can be sharpened to poke at things from afar (remember it didn't take guns and armies to eradicate the mammoths), they ravage entire nations for fun and fuck up their economy to wage total war out of spite, so I get a good laugh each time individual animals are presented as a credible threat.
In real life, megafauna might survive by doing their best to leave us alone and even then they usually die anyway because we kill them just in case, or for sports: almost all animals fear humans because
animals that don't fear us are all dead.
Some dragons are retarded enough to go out of their way to pick a fight with humans, so combined with the damage they might do when they chimp out that would definitely mark them as a hostile race to be exterminated as soon as feasible. We almost eradicated wolves because they chomped on a few sheep, what do you think we're gonna do to a race of literal citybusters who are deliberately hostile to us?
Very few non-D&D settings taking place in more advanced settings still feature dragons, so we all take for granted that dragons were exterminated at some point; settings like D&D are explicitely taking place at "that time" when there were still some megafauna around, on top of all the other theme park fantasy that makes no sense. It's fantasy, just roll with it.
Real life is boring, we are superpredators with no real competition except ourselves. Of fucking course dragons should be a joke to us.