what may happen to the electron when it gains energy?

7 minutes ago 1
Nature

When an electron gains energy, it can move to a higher energy level or electron shell around the nucleus, a process called excitation. This happens because the energy of electrons in an atom is quantized, meaning they can only occupy specific energy levels. The electron may absorb energy from a photon or through collisions, causing it to jump from a lower energy level (ground state) to a higher one (excited state). Later, the electron may release energy by emitting a photon and return to a lower energy level. If the electron gains enough energy, it could even leave the atom entirely, becoming a free electron or ionizing the atom.