I know the Germans were also working on one but never got it done in WWII, so how and why was the USSR the next country to develop a successful nuke so quickly?
In the case of the USSR there was actually an elaborate espionage operation which enabled the Soviets to gain a huge amount of sensitive data from the Manhattan Project (through, most famously, Klaus Fuchs). The Soviets already had a nuclear research program during WWII but had to put it on the back burner. After the war they ramped it up.
Additionally, the Soviets had some of the best physicists in the world (Sakharov being an excellent example) and gained several more by turning captured German scientists (though the German program was laughably immature in comparison they did have several high caliber scientests nonetheless).
Also, I should point out that developing nuclear weapons is not necessarily as difficult as one might believe. The chief difficulty is acquiring sufficient fissile material, but that is as much a matter of industrial capacity as anything else. As far as the first Soviet bombs, my understanding is that they used the same methodology as the US, producing Plutonium via reactors and producing enriched Uranium (used in later bombs) initially via gaseous diffusion.
Quite aside from espionage information (which was good for small details but not the big picture, and was not used especially effectively), the United States government released an administrative/technical history of the Manhattan Project on August 12, 1945, known colloquially as the Smyth Report. It described the general processes used and explained which of them had played a major role in the final production of the fissile material (gaseous diffusion, electromagnetic enrichment, and plutonium breeding). It described the general scale of the work. It was used as a general template for how to arrange a project of comparable size by the Soviets. It does not tell you the details of how to make atomic bombs, but it tells you the basic path you need to follow to get to a bomb.
As for why the USSR was the next one to do it, there were only a few candidate countries in WWII that had the industrial and scientific infrastructure necessary to develop such a weapon. Of them, many had been so ravaged by the war that they had no short-term interest in pursuing a bomb. The USSR was also ravaged by war but was motivated to spend the resources necessary to get the bomb as soon as possible.