On our (West's) side there were definitely lots os mistakes that were made during the last few years.
The most important one is the promise given to Ukraine that it will enter NATO and the EU if only given enough time for implementation details, totally ignoring the needs and apprehensions of Russia next door. Which might be ok in an ideal world, but fact of the matter is that international relations are as far from an "ideal world" as one can imagine, they're one of the last, true bastions of open hobbes-ianism when it comes to politics and human relations. We needed more realists, more people willing to see things as they really were, and less idealists, less people saying things like "how can Putin not accept the sovereignty of other countries? Doesn't he know that breaks international law?"
Also, one must have the feeling that Ukraine has been a little let down by the EU and NATO in all this, especially by the EU. I can understand at this point why NATO won't get involved more than it has (I think they now see the possibility of Putin starting WW3 on the flimsiest of pretences), but imo the EU could have done so much more, at least when it comes to direct economic assistance given to Ukraine and to real economic sanctions imposed on Russia. Just two days ago the Belgians and Italians were still bickering [1] over not imposing sanctions on Russian oligarchs related to the diamond market (very strong in Belgium) and the luxury market (very strong in Italy). When you put in the balance the selling of luxury bags to some Russian oligarchs' wives vs the fate of a nation to whom you had promised the world then something is wrong, really wrong (hopefully, once the war really started a day after that those petty negotiations were put on hold)
Source: me, living in a NATO and EU member country bordering Ukraine
[1] https://twitter.com/MatinaStevis/status/1496758467943866374