As to what the west could actually have done, it's things like "not elect Trump" or "not do Brexit" or "not have growing right wing movement in Hungary and nearby countries". The general fragmentation and disunity in Western culture over the last couple of decades is what allowed Putin to think he could get away with this. The Nato stuff is mostly just another false flag/excuse, or, at best, it's just one tiny part of the cause.
What does that have to do with anything? If anything Trump wanted to stop Nord Stream 2 and wanted Germany to arm itself, and the Hungarians have a deep-seated grudge against Russian imperialism. But none of that mattered in the end because none of it changed the fundamental calculus of "Russia has nukes, and they care more about Ukraine than the West does." We should have been honest about that, and allowed the Ukrainians to seek an arrangement with the Russians as best they could, in a way that doesn't end with civilians getting shelled. Instead, we gave them false hope with our tough-sounding rhetoric, which made a deal politically impossible for Ukranian leaders—and now people are dying because of our lies.