At first, only the U.S. had nukes, dropping them on Hiroshima and Nagasaki in 1945. Britain developed theirs with U.S. help in 1952. Then came the French in 1960, wanting a deterrent independent of the U.S. To deter Arab attacks, Israel also covertly developed nuclear weapons, with secret help from France and sympathetic American scientists. (The Israelis have never admitted that they have nukes.) After losing their 1962 war with China, India tested a ‘peaceful’ device in 1974 and a warhead in 1998.
On the other side, the USSR/Russia got nukes in 1949 through multiple spy rings in the U.S. and Britain. Then came the Chinese in 1962, with help from the Russians. After the 1962 war between India and China, the Chinese helped Pakistan, India’s enemy, develop nukes. (The enemy of my enemy is my friend.). Pakistani officials thereupon sold nuclear technology to anyone who had the money.
South Africa, Brazil and Libya had programs but closed them down.
In summary, First the U.S., Britain, France, Israel and India.
Also, Russia, China, Pakistan and North Korea.
With improved education and hundreds of nuclear power plants around the world, nuclear technical knowledge and expertise became globalized like everything else. For instance, A.Q. Kahn, the godfather of the Pakistani program, first gained expertise and stole technology while working in a Dutch nuclear plant. Later, he used front companies to buy nuclear technology from many countries. Pakistan exploded its first bomb in 1998. Khan later sold nuclear technology to North Korea, Iran, and Libya, making himself a rich man.
When Bush 2 suddenly cut off talks in 2001, North Korea gave the legally required six months’ notice, pulled out of the Nonproliferation Treaty, refused inspections by the International Atomic Energy Agency (IAEA), refined more bomb material and exploded several devices. Since Bush’s no-talks policy obviously hadn’t worked very well, Secretary of State Condoleeza Rice convinced him to go back to negotiating with North Korea. Too late - they had the bomb and weren’t going to give up their ace. U.S. demands that they give up the program in order to get sanctions removed are delusional. The only reason anyone pays any attention to North Korea is their nukes. Nukes also increase Kim’s legitimacy at home. Trump has had meetings with Kim Jong Un, but don’t hold your breath. North Korea also continues trying to weaponize their nukes by developing and testing missiles.
Fortunately, Iran had not advanced far enough to build a bomb. Israel assassinated Iranian nuclear scientists, caused a huge explosion at Iran’s biggest rocket base, and (with the U.S.) sent the Stuxnet computer worm to ruin Iranian nuclear centrifuges. Obama pushed negotiations with Iran as the U.S.,
UN and European Union passed multiple economic sanctions against them for their nuclear program. (This despite misgivings by the Russians and Chinese because they do extensive business with Iran.). The financial sanctions hurt Iran’s economy enough so that they finally concluded a multilateral deal in 2015 that froze the program for 15 years. However, Donald Trump withdrew from the agreement. Iran has responded by purifying more uranium and having its proxies attack oil tankers and Saudi oil facilities.