2017 YZ4: How Quickly Can NASA Detect Incoming Near-Earth Asteroids And What Happens if They Miss One?

The asteroid 2017 YZ4 is hurtling past Earth today at around 21,500 miles per hour. It'll pass closer to the surface of the Earth than the moon does. Yet NASA only detected the asteroid on Christmas Day. Is that not cutting it a little close?
Preparedness for asteroids like 2017 YZ4, which NASA classifies as a Near-Earth Object (don't worry, it should still pass no closer than around 130,000 miles from Earth) is a somewhat divisive field. At the annual meeting of the American Geophysical Union in December 2016, a NASA scientist warned that humans were disastrously underprepared for asteroid impact, but that there also wasn't much we could do about such prospects anyway, according to the Guardian.
Astronomers claim giant asteroid 2017 YZ4 will have ‘near miss’ with planet Earth today https://t.co/Y2a7nd68m7
— Metro (@MetroUK) December 28, 2017
In January of this year, during the final days of the Obama administration, the White House released a National Near-Earth Object Preparedness Strategy, but like many parts of the White House website that page no longer exists. (You can still find the plan here.)
There are international collaborations pursuing the possibilities of deflecting hypothetically dangerous NEOs, essentially by crashing probes into them to knock them off course by a couple of degrees. If caught early enough, by the time they reached Earth that change would have widened into a gap sufficient for them to just sail by. NASA's Center for Near Earth Object Studies has developed an interactive app to study variables of NEO deflection.
CNEOS has a whole roster of search programs, though the smaller the celestial object, the more difficult it is to detect. In 2016, NASA tested a new intruder-alert system for small asteroids that had the potential to get too close for comfort called Scout, which it got to test fairly quickly when such an asteroid passed by in October 2016, according to NPR. Other programs, like the CNEOS monitoring system Sentry, track larger ones. NEOs are generally detected by comparing images of the same part of the sky taken a few minutes apart, according to NASA. It's possible to detect them many years before they'd reach Earth, which is fortunate since some of the trickier ones to deflect might require a few decades' head start.
2017 YZ4 measures somewhere between around 22 and 49 feet across, which relatively speaking is pretty small. For reference, the object responsible for modern Earth's unfortunate lack of dinosaurs was around seven or eight miles across, and for an asteroid to wipe out life on Earth as we know it it would have to be something like 60 miles across, according to Popular Science. If it helps, your odds of getting killed by an asteroid are roughly one in 700,000.
"Extinction-level events, things like dinosaur killers, they're 50 to 60 million years apart, essentially," Joseph Nuth, a researcher with Nasa's Goddard Space Flight Center, told the Guardian last year. "You could say, of course, we're due, but it's a random course at that point."