For example had NATO countries all offered 50% of their GDP for the next decade as gifts to Russia in return for Putin calling all his troops out of Ukraine, it's very likely he would have ended the war on day two.
Of course, that's not an offer NATO countries would have been willing to make (and even if they had made a deal like that, at a price less ridiculously high than 50% of GDP, it could easily lead to Russia starting the exact same war a decade later, now with much better funding).
I'm not suggesting the above as a serious "this should have been the way to deal with it", just as a random, over-exaggerated example that there are diplomatic options above and beyond preventing wars that stem from miscommunication / misunderstandings.
This nuance is important, because sometimes people blame "weak diplomats" etc, but it's not their fault, they can't find equilibrium of strategic interests where there's none.
But it's also something that's much less likely to become public knowledge. Slow and tedious efforts over years and decades contains plenty of discussions of the sort that often can be made public to make both sides look good (or for each side to make themselves look good to their domestic audience), while last minute, last ditch deals to prevent a war that was about to happen is much more likely to involve deals/threats/whatever that one or both parties require remain classified for many decades.
I mean all of them? Today the USA is not bombing London, Berlin is not bombing Paris, Switzerland is not bombing Sweden, Finland is not bombing Norway, Turkey is not bombing India.
If you only count the wars which happened then you ignore all the ones which were prevented.