Since it seems unlikely that Putin will accept a treaty that would require him to give up already conquered territory it makes sense to allow Ukraine to join NATO already. After all there is no reason to think they can fight without help. And Russia does seem to be a threat at this point to the Western Alliance.
Besides that, at this point it is Russia, China, Iran in an alliance against the USA. It makes no sense to let them succeed.
Perhaps I should add that I found the people of the Ukraine to be in general extremely good hearted people. [The problem is the small minority of criminal elements.]
And I should add here that once the Ukraine is encircled which is almost the case already, it will be hard to defend. So to join NATO would be the only means that I can see of protection.