Earth has been hit by asteroids before and survived so far, but sure, it's possible it could be hit by enough, eventually, that it loses its atmosphere, as people think the Earth has already lost 60 percent of its atmosphere from an asteroid strike that they think created the moon[1].
[1]: https://www.sciencefocus.com/news/earth-lost-60-per-cent-of-...
I don't think humans will be around long enough to deflect an asteroid that's big enough to do this, as it could easily be hundred or thousands or tens of thousands of years before it might get hit by one big enough to do this again.
When I was young I would assume we would be around that long, but I don't see a path to escaping our own destruction (possibly not total, but 90% or more of the total population, probably) within the next few hundred years at most, possibly sooner.