TL;DR: A 'risky' career “failing” to have an impact doesn’t mean your career has “failed” in the conventional sense, and probably isn’t as bad it intuitively feels.
You can fail to have an impact with your career in many ways. One way to break it down might be:
The problem you were trying to address turns out to not be that important
Your method for addressing the problem turns out to not work
You don’t succeed in executing your plan
E.g. you could be aiming to have an impact by reducing the risk of future pandemics, and you do this by aiming to become a leading academic to bring lots of resources and attention to improving vaccine development pipelines. There are several ways you could end up not having much of an impact: pandemic risk could turn out to not be that high; advances in testing and PPE mean we can identify and contain pandemics very quickly, and vaccines aren’t as important; industry labs advance vaccine development very quickly and your lab doesn’t end up affecting things; you don’t succeed at becoming a leading academic, and become a mid-tier researcher instead.
People often feel risk averse with their careers- we’re worried about taking “riskier” options that might not work out, even if they have higher expected impact. However there are some reasons to think most of the expect impact could come from the tail scenarios where you're really successful.
I think we neglect is that there are different ways your career plan can not work out. In particular, many of the scenarios where you don’t succeed to have a large positive impact, you still succeed in the other values you have for your career- e.g. you’re still a conventionally successful researcher, you just didn’t happen to save the world.
And even if your plan “fails” because you don’t reach the level in the field you were aiming for, you likely still end up in a good position e.g. not a senior academic, just a mid-tier academic or a researcher in industry, or not a senior civil servant but mid-tier civil servant. This isn’t true in every area- in some massively oversubscribed areas like professional sports failing can mean not having any job. Or when doing a start-up. But I’d guess this isn’t the majority of impactful careers that people consider.
I also can imagine myself finding the situation of having tried and failed somewhat comforting in that I can think to myself “I did my bit, I tried, it didn’t work out, but it was a shot worth taking, and now I just have this normally good life to live”. Of course I ‘should’ keep striving for impact, but if that relaxing after I fail makes me more likely to take the risk initially, maybe it’s worth it.
TL;DR: A 'risky' career “failing” to have an impact doesn’t mean your career has “failed” in the conventional sense, and probably isn’t as bad it intuitively feels.