It would take them only a few months. Ukraine is filled with Soviet nuclear technology and Soviet nuclear engineers. They have nuclear reactors. Ukraine is richer than North Korea, and they have their own uranium mines. North Korea spent a couple billion on their nukes, but Ukraine's military budget is $82B a year, so they could easily surpass North Korea.
Geopolitics experts agree that Ukraine could build a nuke if they wanted to. The issue is that the west definitely would not want to see a world where countries threatened by Russia turn to nuclear proliferation.
Here's a video from a Danish military analyst talking about the decisions that have to be made on how to secure Ukraine after the war:
It's important to note, Ukraine is willing to freeze the front line now in return for security guarantees. But If the US or the EU don't step up to end the war soon, Ukrainian nuclear engineers will.
Trump started plenty of wars https://youtu.be/QQYFVEka3fA