And even that is debatable. Japanese surrender came shortly after a quick succession of several events - the first bomb at Hiroshima, Soviet Union declaring war and invading continental Japanese land, the second bomb at Nagasaki, allies completely obliterating Japanese navy, and preparing to invade their home islands, etc.
Many argue that Japan would surrender even without the two nuclear bombs.
If you ever need to ask yourself this, you ain’t no friend of mine…