Note the timing of the various creatures in the bird line.
Most pterosaurs are replaced by (develop into) enantiornithes etc. well before the end of the Cretaceous. Then most of the enantiornithes are replaced by (develop into) modern birds in the Late Cretaceous.
"...and describe the gradual decline of pterosaurs at the same time modern birds radiate."
"It is clear that modern birds from at least the latest Cretaceous lived at the same time as archaic birds including Hesperornis, Ichthyornis, and the diverse Enantiornithiformes. Pterosaurs, which also coexisted with early crown [modern] birds, show notable changes through the Late Cretaceous. There was a decrease in taxonomic diversity, and small- to medium-sized species disappeared well before the end of the Cretaceous. A simple reading of the fossil record might suggest competitive interactions with birds, but much more needs to be understood about pterosaur life histories."