There are many thoughts on how the dinosaurs died out, including the thought that they didn’t but instead evolved into birds, or even that birds are small dinosaurs. In other words, dinosaurs did not die out, they changed.
And more than one of the various theories may have been operative. This is quite likely the case because “dinosaurs” (the large species at any rate) died out but crocodilians, turtles, and mammals did not. Trilobites vanished and brachiopods and nautiloids almost disappeared but other shelled and multi-shelled creatures did not.
There is indeed evidence of at least one and probably several large meteors impacting the earth and altering the climate in such a way that ecosystems changed drastically. This caused starvation, leading to disease, less hardy offspring, shortened life spans and quite simply death from famine.
Related to this is the fact that so many dinosaur species became very specialized by the end of the Age of Dinosaurs, living apparently in very specific ecological niches and feeding on very specific foods. If something happens to the one food your species can eat, then the species is in big trouble. Look at Giant Pandas, who live only on bamboo. What happens to their numbers if something happens to bamboo? They drop precipitously.
Also, as sea levels changed and tectonic plates moved land bridges formed allowing previously isolated groups of dinosaurs to come into contact. The possibility then arises that one group of dinosaurs might carry a disease that the other group was never previously exposed to, hence a lack of herd immunity led to massive epidemics and death. A similar situation occurred when Europeans first came to the Americas and brought several diseases not previously known in this hemisphere (and in return took a different form of the syphilis bacterium back to Europe).
And there are other theories on why so many dinosaurs and some other creatures died out, but so many others did not. However, it was probably a combination of factors.