A pair of recently-published papers have introduced a couple of new pterosaurs to the scientific world and provide us insight into the niches these creatures were able to inhabit. So we're clear, pterosaurs are technically a type of lizard, and included the pterodactyl among at least 130 pterosaur genera. They in the late Triassic Period and endured until the late Cretaceous Period (228 to 66 million years ago), going extinct along with the dinosaurs. Further, modern birds are not descended from these reptiles, but rather from avian dinosaurs.
One of the newly-described species is the Kunpengopterus antipollicatus, nicknamed 'Monkeydactyl.' It has received that moniker for having opposable thumbs and living in trees. The other, anurognathid, has a passing resemblance to the porgs of Star Wars: The Last Jedi. Both of these species of pterosaur lived around 160 million years ago, and were uncovered in China.
Monkeydactyl, as it's been called, appears to be the earliest animal to sport an opposable thumb, such that it could touch its thumbs to its other fingers. Its physiology leads paleontologists to believe that it was adapted to life in trees, consuming insects and similar prey. While closely-related varieties of pterosaur existed in the same time and place, so far no others have been found to have similar adaptations to an arboreal existence. In our times tree frogs and certain types of primates fill this ecological niche.
Anurognathids, for their part, had small bodies, membranous wings, and a thin tail. Their proportionally huge eyes were likely advantageous in low-light conditions as they snatched insects into their wide, grinning mouths. These diminutive pterosaurs were probably fuzzy, having a pelt of tufted pycnofibers that were neither hair nor feathers. Where the Kunpengopterus antipollicatus was in the same space as arboreal primates and tree frogs in our times, anurognathids were more like the bats of the late Jurassic. To me they look more like little sky gremlins than cuddly porgs.
Consider now how long it took for these and other ecological niches to be filled again. After the meteor struck the earth, ending the Cretaceous and initiating the Paleogene, three quarters of life on earth went extinct in a matter of between 10,000 and 20,000 years. That might seem like a lot to us small humans with our brief life spans measured in decades, but in geologic time it's a blink of an eye. All non-avian dinosaur species, millions of varieties of microscopic organisms, and a vast array of invertebrates were wiped out. Plant species suffered as well, with loss from diminished sunlight in the short-run, to a dramatically changed planetary climate in the long-run. It took between 4 and 10 million years for a full restoration of biodiversity to occur. That means that for millions of years there were roles not being played in the environment. Perhaps it was quite a while before bats and monkeys took the places of creatures like the flying porgs and monkeydactyls.
As I indicated in the opening paragraph, we're dealing here with spans of time that are inconceivable to the human mind. We can talk about them, but rarely do we glimpse the actually scale of time we're considering here.