To achieve sustainable prompt criticality, you need high-quality starting material with low spontaneous fission, and a fast assembly (microseconds). "Gun-type" assembly is not used anymore even by new nuclear programs, as it is very inefficient (and still requires quite a lot of precision engineering). With implosion assembly, you need to learn quite a lot about shock compression, numerical simulations of detonations, and again it requires some precise engineering. "A nuclear bomb is like a half-ton Swiss watch", as somebody have said.
I believe it is possible to build a nuclear device from scratch, but you need a few years, explosion testing rigs and radiography equipment, a team of engineers and physicists, and a few millions budget. If you don't have starting material, it will be much more expensive.