Why does Sodium lose an electron and attains +1 charge?
Because sodium has 1 electron in the valence shell and it prefers to lose it rather than gain extra 7 electrons.
Sodium has 1 electron in its valence shell (outermost orbit). When any atom has 3 or less than 3 electrons in the outermost orbit, it’s nature is to lose the electron to attain the octet state.
All , when undergoing chemical bonds, try to attain the octet state. It is much easier for sodium, which has 1 electron in the valence shell to lose it and attain octet rather than to gain an extra 7 electrons from other atom.
So, it prefers to lose the electron and gain +1 charge.
The +1 charge is due to the fact that after the electron is lost, the number of protons will be one more than that of the electrons.