Why do many wealthy countries not have nuclear power, and under what agreement do they keep themselves disarmed?

Bangladesh was separated from Pakistan in the seventies due to war. Now, after the Sheikh Hasina government has stepped down, the country is so focused on opposing India that it calls Pakistan a friend and talks about teaching New Delhi a lesson. Recently, Shahiduzzaman, a professor at Dhaka University, made similar remarks and said that