The energy levels depend on two things:
the electrostatic attraction between the electrons and the nucleus
the electrostatic repulsion between the electrons
If you take a hydrogen atom, which is what your diagram shows, then there is a single electron and a single proton. The electron is attracted to the proton and there is no electron-electron repulsion because there is only one electron.
If you move on the the next element, helium, there are two electrons and the nucleus contains two protons. So the attraction between the electrons and the nucleus is now twice as big but we have a repulsion between the two electrons. Both these factors change the energy levels so they are not the same as hydrogen. The next element, Lithium, has three electrons and three protons in the nucleus so the energy levels are different again. And so on.
So all the atoms of a given element have the same energy levels because they have the same numbers of electrons and protons. For example all hydrogen atoms have the same energy levels. But the different elements have different energy levels because they contain different numbers of electrons and protons. The hydrogen energy levels differ from helium, which in turn differs from lithium and so on.
And just to complicate matters the number of neutrons in the nucleus makes a small difference as well, so for example the energy levels of hydrogen are slightly different from the energy levels of deuterium and tritium.