Ukraine disarmed their nuclear stockpile. Obviously Russia wouldn’t have invaded otherwise.
Ukraine as part of disarmament treaties even send russia Kh-55 cruise missiles and Tu-160 strategic bombers that are now used against them.
They disarmed their nuclear stockpile and their long range strike capability under an international agreement where the largest players in the world made promises / guarantees to them.
My guess is that they suspected that Russia would actually follow them and not break it because they felt like it.