The American public at that point held a deep animosity of the Japanese due to Pearl Harbor and the ongoing war. There was already a large firebombing that was supported by many in the nation. Since the Japanese had a “no surrender” policy and an invasion of the home islands would’ve been costly in lives on both sides. It most likely would have taken years of war to make it to Tokyo.
When they found out about the bombings, the majority of Americans were just relieved that the war was over and the soldiers could all come home. Everyone was honestly just tired of war at that point and were happy there was a quick solution. Relief was great since many were worried about possible attacks on US soil if the war dragged on. For many, the nuclear bomb made it feel like the nation couldn’t be pushed around anymore and had a lead on other countries (specifically the USSR). There was also a shift from an isolationist point of view (US staying out of foreign affairs) to one of building ties with other nations and spreading influence across the world. This also began the arms race with the Soviet Union which would impact Americans greatly in the future.
While many supported the use of the bomb, some saw it as unethical and unnecessarily cruel to innocent Japanese citizens. Many scientists understood the destruction it could cause and that it would forever change future warfare.
Despite this, studies made across decades show that the support for the use of the bomb was extremely high amongst American citizens in the 40s-50s compared to modern times.