You might have seen animations like this that show an electron undergoing a transition from a lower energy to a higher energy state and vice versa like so:
There is something really important about this image that one must understand clearly.
The diagram represents the transition in energy of an electron BUT this does not mean that the electron
is magically jumping from one position and respawning at another
The electron’s position is NOT doing this i
If you want to know about the probability of finding an electron around the nucleus at a certain energy level, you look at its wavefunction and not at the energy diagram.
Here is the wavefunction of a hydrogen atom and each stationary state defines a specific energy
level of the atom.
This might not sound like a big deal but one might be surprised to know that there are a lot of people who think that the electron is magically transported from energy level to another which most certainly is not true.
Have a good one!