it is most likely due to a meteorite that hit what is now mexico. The explosion would have been so massive that dust would have blanketed the whole world and whilst it was in the atmosphere, it blocked out the sun. When the plants can’t photosynthesise any more they begin to die, causing plant eating dinos to die out as well. This in turn means there is no food for the predators and the dinos were driven to extinction. The technical term for this is a trophic (food chain) collapse.