The JWST which is nearing it's operational status just gor hit by a small meteorite. That's the risk when sending something to space. Even though the space is really, really big there is also a lot of stuff flying around.
Luckily the damage caused by the collision were not severe and should not prevent the telescope from operating fully within it nominal values. The team that designed the telescope had taken this kind of events into consideration when designing it making sure there is enough toleration for minor damages.
It was just a shock that first such major event happened so soon. I truly hope this was just a statistical anomaly and not an oversight from the people who estimated the probabilities of such collisions.
The telescope actually has ways to either get away from threatening objects or turning it's more robust side towards the imminent collision if there is no time to evade the impact. Unfortunately these objects are relatively small while traveling at high speed making it quite challenging to detect them in time.