For a few tense weeks earlier this year, asteroid 2024 YR4 loomed large in the minds of astronomers and the public alike.