1. Before Hiroshima and Nagasaki, the political establishment in almost all countries were not entirely convinced of the tremendous destructive power the nuclear weapons would have. That's one of the reasons why Truman's advisors wanted the nukes deployed, in order to convince Stalin that the US indeed had a super weapon. Incidentally, Hiroshima and Nagasaki combined killed less people than the firebombing of Tokyo five months earlier. The US army was planning for combat on irradiated battlefield as late as the early 1960's; that's after the hydrogen bombs, which were of comparable orders of magnitude more powerful than fission bombs as the latter compared to conventional TNT.
2. Neither Germany nor Japan had the industrial or economic wherewitheral to develop nuclear bombs. . . especially by 1945, when both countries had its fuel and electric infrastructures destroyed. Brits and Norwegian resistance had succeeded in destroying German heavy water production in 1943 . . . and even that heavy water production was part of a civilian nuclear power generation project. Germans had given up on nuclear weapons, thinking the development time horizon would be way too long to have any effect on the war; that decision had been made in early 1942.
3. Even if Germany were given in Feb 1945 all three nuclear devices that the Manhatten project produced before the end of the war in August, plus half a dozen more that would take the US until 1946 to have despite the industrial might of the US free from war time destruction, the Germans would still have lost the war. For one thing, by 1945 they did not have the means to deliver such a weapon; they'd have to detonate the devices on themselves to destroy invading armies in order to make sure the weapons were indeed detonated, assuming the train or horse wagon hauling it was not strafed and destroyed by allied fighter-bombers first. LOL.
4. Japanese were much much farther behind on nuclear weapons development, with even less means of delivery to Allied targets due to geography. Sure, detonating a nuclear device on board Yamato may have brought down a few more allied aircrafts than it historically did with AA guns, but it still would not be able to reach even Okinawa. None of the Japanese bombers had the carry capacity for a nuclear bomb of that vintage; none would pass Allied fighter CAP anyway (nor would any German, by 1945). No Japanese ship could reach even Okinawa by March 1945 without being sunk hundreds of miles away first.