The Cretaceous was also a time of change, and many new dinosaurs evolved.
Because contents had split apart, animals evolved differently on the separate continents. So species found on one continent are not found on another. For this reason, the Cretaceous saw more variety in dinosaurs than ever before. This is why the kinds of Tyrannosaurus found in North America are different from the Tyrannosaurus species in Asia (called Tarbosaurus), for example. Other famous dinosaurs were plant-eaters such as Triceratops and Zuniceratops.
But competition was setting in as birds evolved from dinosaur ancestors and competed against the pterosaurs, which gradually went extinct.
This change was not all good for dinosaurs. New kinds of plants flowering plants including broad-leaved trees were evolving and dinosaurs were not evolving fast enough to eat this new food. Many dinosaurs faded away during the Cretaceous.
But then, as so many times in the past, and presumably as will happen in the future, there was a catastrophe that changed the world. About 65 million years ago a comet crashed into the Earth somewhere around what is now the Gulf of Mexico in America. Huge clouds of dust were thrown up and the climate cooled. Many plants died, so there was less food for the plant-eating dinosaurs. That in turn meant there was less meat for the hunting dinosaurs and so they died out too. The time was over for the dinosaurs.
They may well have perished especially because they were so big and needed so much food. But, whatever the cause, without the dinosaurs in the early years of the Tertiary period that followed the Cretaceous, a small number of mammals were able to find enough food and thrive, evolving to take over the land once ruled by dinosaurs. And those mammals eventually evolved into, amongst others, you and me.