Russia has always opposed neighbors joining NATO. Russia threatened us as well in Norway when we joined. But you can still find compromises. In Norway we made it official policy to not allow nuclear weapons on Norwegian soil or host any American bases.
The US has pushed for bases for decades however. Our last conservative government relented and gave the US a base. Personally I think that was a terrible choice as the No-base policy was a fundamental pillar in our relation to Russia and helped keep good relations.
Anyway bottom line is that Russia has never cared about the safety of smaller nations. Only their own. But I don’t see why our desire to be safe in Norway should take back seat to Russian desire for safety.
Likewise Ukrainians have as much right to care about their safety as Russians.
Thus in moral terms Russia don’t have a case. But in terms of practical politics we screwed up. Promising NATO membership some time in the future painted a target on Ukraine. They should officially have rejected NATO membership until NATO was ready to accept Ukraine on short notice.