The animal doing the flying is a pterosaur, not a dinosaur
Type "names of dinosaurs that fly" into a search bar and the honest answer is that there are no good ones, not in the sense most people mean. The flying reptiles usually meant by that phrase are pterosaurs, a group that first shows up in the fossil record more than 220 million years ago in the Late Triassic, which makes them older than Tyrannosaurus rex, Velociraptor, and every other dinosaur most people could name off the top of their head. Pterosaurs and dinosaurs share a common ancestor and lived through the rest of the Mesozoic side by side, but they sit on separate branches of the reptile family tree. The specific anatomical differences, a hip socket shape and an inner-ear structure among them, are laid out in full in FactCrumbs' guide to pterodactyls and what a pterosaur actually is.
There is one genuine exception, and it is not the one people are usually reaching for. Birds are dinosaurs, descended from small feathered theropods, and Archaeopteryx, a fossil from Late Jurassic Germany dated to roughly 150 million years ago, is the oldest one a 2018 study of its wing-bone geometry found capable of true powered flight rather than gliding alone. Set that exception aside, and every animal commonly filed under "flying dinosaur" (Pteranodon, Quetzalcoatlus, Hatzegopteryx, Dimorphodon) was a pterosaur. Here are the real names, and the fossil stories that came with each one.
Pteranodon: the crested one whose skull turned up in 1876
Pteranodon is the species most people actually picture, and its name (Greek for roughly "wing without a tooth") describes the one feature that first told paleontologists they had found something new. American paleontologist O.C. Marsh reported the genus from Kansas's Smoky Hill Chalk in 1876, but it was his field collector S.W. Williston who found the type skull, cataloged as YPM 1177, on May 2, 1876, complete enough to show a toothless beak and a bony crest that earlier, tooth-bearing pterosaur finds did not have. More than 1,100 specimens have been recovered since, the largest known sample of any pterosaur genus, and they show individual wingspans ranging from roughly 3 to 6 meters (9 to 20 feet), with the single largest known specimen estimated at 7.25 meters. Crest size and shape varies enough between individuals that five different species names were proposed before later work folded most of them back into sexual and individual variation within one genus.
Direct physical evidence of what shared the Western Interior Seaway with Pteranodon came from a 2018 study by David Hone, Mark Witton, and Michael Habib, published in PeerJ. The team examined a Pteranodon neck vertebra with a broken shark tooth wedged beneath one of its joint surfaces, identified as belonging to Cretoxyrhina mantelli, a large lamniform shark that patrolled the same inland sea. The tooth never pierced all the way through the bone, so the fossil cannot say whether the shark killed the pterosaur or simply scavenged a carcass floating on the surface, but it stands as rare direct proof of an interaction between two of the seaway's biggest predators rather than an inference drawn from separate fossils.
Hatzegopteryx: named in 2002, and possibly the local apex predator
Hatzegopteryx thambema was formally described in 2002 by paleontologists Eric Buffetaut, Dan Grigorescu, and Zoltán Csiki, based on skull and arm bones from the Maastrichtian-age Densuș-Ciula Formation in Romania's Hațeg Basin. The genus name joins "Hatzeg," for the basin where it was found, with the Greek word for wing; the species name, thambema, translates to "monster." The original description put its wingspan at 12 meters or more and its skull, unusually stout-boned for a pterosaur, at close to 3 meters long, roughly comparable in wingspan to Quetzalcoatlus, the largest pterosaur ever found, but far more heavily built.
Hatzegopteryx lived on what paleontologists call Hațeg Island, one of a scattered archipelago that made up much of Europe during the Late Cretaceous, alongside dinosaurs that show clear signs of island dwarfism from limited resources, including the titanosaurs Magyarosaurus and Paludititan and the iguanodontian Zalmoxes. A 2017 study by Darren Naish and Mark Witton, published in PeerJ, examined a newly recovered Hatzegopteryx neck vertebra, 240 millimeters long as preserved and nearly as wide, and found it belonged to an animal with a proportionally short, thick, torsion-resistant neck rather than the long, slender neck typical of its relatives. Naish and Witton concluded that the animal's "size, robust anatomy, and the deficit of other large carnivores in well-sampled European deposits implies that it may have been an arch predator in its community," potentially capable of tackling prey too large to swallow whole, including subadult dwarf titanosaurs and iguanodontians sharing its island.
Dimorphodon: Mary Anning's find that needed two names to get right
Fossil collector Mary Anning found the skeleton that would become Dimorphodon at Lyme Regis, on England's Dorset coast, in December 1828. Geologist William Buckland acquired the specimen and presented it to the Geological Society of London on February 5, 1829, classifying the animal within the existing genus Pterodactylus and naming the new species macronyx, Greek for "large claw," after the prominent claws on its hands. It was, at the time, the first pterosaur found anywhere in Britain.
The classification held for three decades. In 1859, anatomist Richard Owen, who had examined the specimen more closely, decided the animal was different enough from other Pterodactylus species to warrant a genus of its own, and renamed it Dimorphodon, "two-form tooth," a reference to the fact that its jaws carried two visibly different tooth shapes at once, large fang-like teeth toward the front and small, blade-like ones further back, a combination rare among reptiles generally. Anning had already given British science a different kind of "not a dinosaur" fossil five years earlier: the first complete plesiosaur skeleton, found at the same stretch of Dorset coastline in 1823.