Sometimes, the electrons in an atom's outermost shells do not have a strong force of to the protons

, causing them to be easily transferred or shared with other atoms. This leads to the formation of chemical bonds between atoms, resulting in the creation of molecules. These bonds can be ionic, where electrons are transferred from one atom to another, or covalent, where electrons are shared between atoms. This process helps atoms achieve a more stable electron configuration and fulfill the octet rule, where atoms strive to have a full outer shell of electrons.