Ukraine applied to Nato in 2008.
https://en.m.wikipedia.org/wiki/Ukraine%E2%80%93NATO_relations#:~:text=Ukraine%20applied%20to%20integrate%20with%20a%20NATO%20Membership,to%20keep%20the%20country%20non-aligned%2C%20was%20elected%20President.
2008 - so it wasn’t granted. And 14 years later that’s why Putin invaded?