Actually it was FDR’s doing. Truman had nothing to do with various of FDR’s “deals” like Tehran, Yalta, ...
At Yalta Stalin promised to enter the war against Japan within two to three months after the defeat of Germany. At that time FDR couldn’t know for sure that the atomic bomb would work. Stalin kept his promise to the day, declaring war on Japan exactly three months after V-E Day.
At Yalta FDR gave lots of Eastern Europe to Stalin in exchange for the Soviet Union joining in the war against Japan with whom they had a neutrality pact. They promised to go to war against Japan three months after the end of the war against Nazi Germany. The Germans surrendered on May 8, 1945. August 8 was exactly three months to the day after the end of the war in Europe.
Using the atomic bomb when we did prevented the Soviet Union from dividing Japan the way they divided Germany and Europe.