According to the Aufbau principle in the ground state of an atom or ion, electrons fill atomic orbitals of the lowest available energy levels before occupying higher levels.
The Aufbau order of occupancy of electronic energy levels is:
1s 2s 2p 3s 3p 4s 3d 4p 5s 4d 5p 6s etc.
From this we can see that the level occupied just after 4p is 5s , such that 5s is of a higher energy level compared to 4s