An atom has a set number of particles that determines what kind of element they are.
Each element has a specific number of protons (positive charge) in its nucleus. It is this number that defines an element and cannot change in everyday situations.
Protons in the nucleus of an atom are very stable and don’t typically move around or get created or destroyed. There are a fixed number and they maintain their positive charge within the atom.
Electrons (negative charge) surround the nucleus, with the number typically matching the number of protons to create a neutral atom.
Regardless of their energy level, an atom retains the same number of electrons it started with.
If an atom loses or gains an electron, it is no longer considered the same element and becomes an ion.
The movement of electrons within an atom doesn’t change their total charge because the number of protons and electrons remains constant. However, the movement of electrons does affect the amount of energy within the atom.
Electrons in an atom change energy levels as they gain and lose energy.
So when an electron absorbs energy (such as visible light), it jumps to a higher energy level further away from the nucleus. However, the electron itself remains negatively charged, it just occupies a different position within the atom.