According to Wikipedia's article about Hans Bethe, who worked on the Manhattan Project,
When it [Gadget] was detonated in the New Mexico desert on July 16, 1945, Bethe's immediate concern was for its efficient operation, and not its moral implications. He is reported to have commented: "I am not a philosopher."
On the other hand, Oppenheimer famously quoted "now I am become death, destroyer of worlds).
Some 10 years later von Neumann coined the term MAD, mutual assured destruction, and 15 years later Kahn wrote about "doomsday devices" in On Thermonuclear War. In 1962, the Cuban Missile Crisis.
I am interested in to what extent that development, that nuclear war would be a serious existential risk, was foreseen by scientists, military, and others, who worked in the Manhattan Project, and how they thought about the ethical implications of their work.
Oppenheimer's quote is complex and about duty and responsibility; it is widely misunderstood. More on this here.
Bethe is himself a tricky character, who did wrestle with the idea of the moral responsibility of the scientist towards their creations/discoveries, but ultimately found it convenient at times to distance himself from the idea that he was responsible.
Von Neumann was his own, interesting, tricky character. Considered one of the great hawks of his time, for example.
Which is only to say: you cannot take three eminent participants and generalize attitudes from them. They are all very particular and very interesting people, and they had very different reactions to the development of nuclear weapons. Oppenheimer embraced them but then tried to moderate the effects of them. Bethe was always kind of on the fence, simultaneously trying to work in favor of moderating or even banning them, but also developing them. Von Neumann was basically 100% in favor of them, believing them to be a path towards security, even favoring (at times) pre-emptive use.
All three saw nuclear war as an existential risk from early on. Not the first bombs, mind you — they were not existential in and of themselves. But they pointed towards a future with many bombs, larger bombs, faster delivery mechanisms. They took different approaches to resolving this threat, with Oppenheimer trying to set up a scheme where nuclear weapons would be effectively banned globally (the Acheson-Lilienthal proposal). When that failed he shifted towards other approaches. Von Neumann at times believed that if nuclear war might in the future be existential, and that at the present the US was able to wage it effectively against the USSR without it being existential, then the US ought to do so rather than wait until the USSR got to a stage where a total nuclear exchange would be globally fatal. None of these are bonkers proposals, but they are different visions of what the future might be.
Oppenheimer wrestled with the ethical implications of the Manhattan Project his whole life. On the whole he tended to defend the work and his role, though he did express regret that the loss of civilian life was so high (higher than he had expected it to be when he agreed the bombs should be used on cities). But he never renounced his work, or expressed explicit regret of it. He did talk in moral terms, e.g., "the physicists have known sin." Von Neumann by contrast really had no ethical problems with it, and even chastised Oppenheimer for his hand-wringing ("sometimes someone confesses a sin in order to take credit for it").
These are just points on a spectrum. Note that all three of those people continued to work within the weapons complex. There were many scientists who worked on the Manhattan Project who never worked on weapons again in their lives, sometimes with explicit moral reasons (e.g. Leo Szilard), sometimes with implied moral reasons that were never stated very publicly (e.g. Richard Feynman).
I have not spoken of Hermann Kahn because he did not work on the Manhattan Project and is a somewhat different breed altogether (he is the "next generation," and his own complex case).
Anyway. This is a complex question. There are a lot of possible positions that the scientists were capable of taking. In the 1940s through 1960s you could also still be a "liberal, anti-war" sort of scientist and still work on nuclear weapons some of the time. Hell, there are scientists who work on nuclear weapons today who fall into that category (they draw a moral distinction between working on weapons that, ideally, will never be used to kill anyone, versus those who work on things that definitely will be used, like conventional munitions). It is not a simple moral calculation, and the mapping of the moral questions onto politics has always been tricky.
On Bethe and Oppenheimer in particular, see S.S. Schweber, In the Shadow of the Bomb: Oppenheimer, Bethe, and the Moral Responsibility of the Scientist (Princeton University Press, 2000). A good Oppenheimer biography is Sherwin and Bird's American Prometheus: The Triumph and Tragedy of J. Robert Oppenheimer (Knopf, 2005). A great comparative biography of several people who took very different political positions is Gregg Herken's _ Brotherhood of the Bomb: The Tangled Lives and Loyalties of Robert Oppenheimer, Ernest Lawrence, and Edward Teller_ (Henry Holt, 2003). For a number of interesting discussions about how weapons scientists (and their opposition) have considered the moral issues over time, see esp. Hugh Gusterson, Nuclear Rites: A Weapons Laboratory at the End of the Cold War (University of California Press, 1996), which is an anthropological study of the Livermore weapons laboratory in the 1990s. On the reaction to Manhattan Project scientists to the bombing of Hiroshima and Nagasaki, Alice Kimball Smith's A Peril and a Hope: The Scientists' Movement in America, 1945-47 (1971) is excellent, and covers attempts by people like Oppenheimer, Bethe, and Szilard to try and reign in the bomb in the immediate postwar. If you are interested in broader public responses, Spencer Weart's Nuclear Fear: A History of Images (Harvard University Press, 1988) covers a huge amount of time very well, while Paul Boyer's By the Bomb's Early Light: American Thought and Culture At the Dawn of the Atomic Age (1985) drills in more specifically on the immediate postwar period.