How is Aufbau principle derived or proved?

on a note, why does the energy of 3d subshell is More than that of 4s subshell, instead

as 4s is greater in extent than 3d,4s should have greater energy!

though I have read the answers here

Is Palladium an exception?

Could the Periodic Table have been done using group theory?

Aufbau principle in modern quantum theory

I cannot find a definite explaination or proof of the above theory(rule)