"If one day an asteroid like Dimorphos is discovered to be headed toward Earth, an interceptor craft like DART could collide with the asteroid years in advance to avert disaster. Here’s how that might work."
https://spectrum.ieee.org/planetary-defense-killer-asteroids