The orbitals are filled in order of the energy levels which is determined by two things - the n and the l quantum numbers, also called the principal and secondary quantum numbers, with the principal, n, being the shell name. The value of n goes 1, 2, 3, 4, 5, etc, while the value of l goes 0, 1, 2, 3, 4 etc and are given a letter value s, p, d, f, etc to be easier to say out loud. So for example 3p orbital has 3 as the principal quantum number and p as the secondary quantum number l which means its value is 1. The sum of these two gives the order in which they are filled, the lowest ones first.
The order is, therefore, with the lowest energy first (lowest energy ones are held closer to the nucleus, in simply terms)
1s, 2s, 2p, 3s, 3p, 4s, 3d, 4p, 5s, 4d, 5p, 6s, 4f, 5d, 6p, 7s, 5f, 6d, 7p, 8s
Because the sum of these two quantum numbers is thus
1s (1+0), 2s (2+0), 2p (2+1), 3s (3+0), 3p (3+1), 4s (4+0), 3d (3+2), 4p (4+1), 5s (5+0), 4d (4+2), 5p (5+1), 6s (6+0), 4f (4+3), 5d (5+2), 6p (6+1), 7s (7+0), 5f (5+3), 6d (6+2), 7p (7+1), 8s (8+0).
There is the additional guide that the principal quantum number is a bit more important in determining the total energy of an orbital.
eg 2p sum n+l = 3, 3s sum = 3, so 3s is higher in energy than 2p
and 5s sum = 5, but 4d sum= 6, so 4d is higher energy than 5s
and 6s sum = 6 but 4f sum = 7 so 4f is higher in energy. But while 5d sum=7 , the principal n =5 for 5d trumps the other two orbitals.
The higher energy ones are easiest to ionise, they are the valence electrons, and are farther from the nucleus. They need less extra energy to be removed than the ones close to the nucleus.
It's NOT simply all the 1 levels, then all the 2 levels, then all the 3 levels, then all the 4 levels, then all the 5 levels as you are currently suggesting.
Now to give a more detailed explanation than this takes a year or two at university. And I don't have the time to go through that size of an explanation.