Glad to see you are making progress!
To try and analyze what is going on with the order of fillings, consider the "n+l" rule for orbital filling. Early on in the periodic table, orbital locations with higher "n+l" numbers are higher in energy and fill after the lower energy orbitals. Basically how this works is the distance from the nucleus is determined by the "n". For instance, for 2s the n is equal to 2. The 2s orbital is located further away from the nucleus than the 1s orbital as indicated by its higher n. The 2s orbital fills after the 1s orbital. Next, you have to consider the "l" part. I am going to deviate a bit from the orthodox way of explaining things by saying that "l" relates to the complexity of the orbitals. So, if you are comparing 2s to 2p, p has a higher "l" value than s. It is more complex, so even though both orbitals have n=2, the 2p orbitals are higher in energy due to their added complexity and fill after the 2s orbitals.
The values of l for the different orbitals are:
s = 0
p = 1
d = 2
f = 3
So you can use this to predict the order of filling (it is just another tool to come up with the chart I linked to earlier). Here are some examples to show how it works:
2s: n+l = 2 + 0 = 2
2p: n+l = 2+ 1 = 3 (the n+l is higher for 2p so it fills after 2s)
4s: n + l = 4 + 0 = 4
3d: n + l = 3 +2 = 5 (the n+l is higher for 3d so it fills after 4s even though 4s has the higher "n" value)
However, if the difference in "n" values is greater than 1 unit (as can be the case towards the bottom of the periodic table), you can have the lower n+l values fill first because the difference in n outweighs the n+l rule. This is the case for the example you were curious about:
6s: n + l = 6+0
4f: n + l = 4 +3 = 7 (you would predict that the 4f orbital would be favored over 6s, but in actuality the difference in energy levels between 6 and 4 of two whole units overcomes previous trends so 6s actually fills before 4f. In fact, once you get down to this level on the periodic table a lot of the previous trends start breaking down because all the orbitals get very close to one another in energy).