I suspect it would be easiest to just take the nuclear material out of the unusable missiles and construct a different weapon using it. Russia is adjacent to them so any sort of nuclear weapon launch-able from an artillery or plane still sounds useful.
Despite the breakup of the USSR, I don't think Russia would have let that happen.
For comparison, How do you think that the USA would react if Turkey tried to size control of US nukes housed there?
No it wouldn't.
They were pressured by the US to give up Soviet nukes. Codes are easy to fix, but nukes need service and are expensive to keep so it was as much of sparing measure than anything.
If Ukrainians wanted they could have prevented this at the time of Soviet Union dissolution, but they didn't so there's not much to discuss.
My point is basically that if Ukraine tried to take full control of the Nukes in their country, they would have been picking a fight with Russia, and possibly the US as well.
https://www.washingtonpost.com/archive/politics/1992/03/14/u...
https://www.jstor.org/stable/resrep10926.13?seq=2#metadata_i...
See for instance where that was built: https://en.m.wikipedia.org/wiki/R-36_(missile)
Also, Chernobyl.
The answer is probably because the alternative was too scary for the west. Better to keep dealing just with Moscow.
But the general thought is that NATO would have had to protect them (I don't buy it, but that's the theory).
Nato isn't a signatory of the Budapest Memo [1].
[1]: https://en.wikipedia.org/wiki/Budapest_Memorandum_on_Securit...
Again, I think it's unlikely and the "Russia wouldn't have invited Ukraine if they had kept their nukes" doesn't actually fly (and probably would just have been another reason for Russia to invade: 'they're right there and they have nukes!'
For that reason, the international community wouldn't have accepted it either, because it would open the door for everyone else to start developing them. Kazakhstan had nukes and voluntarily disarmed for this reason.
The US did not want another nuclear power and was very interested in making sure Ukraine never became one