How is the electronic configuration of elements determined in practical? Theoretically, we use certain rules (Aufbau principle, Pauli exclusion principle, and Hund's rule) to define the electronic configuration of elements. There are some exceptional cases and some explanations for them. This is what I know about electronic configurations so far.
I wonder how we know the electronic structure of any element practically and how the exceptional configurations became known to us? I mean the electronic configuration of copper, according to rules, should be [Ar] 3d⁹ 4s² but in actual it is [Ar] 3d¹⁰ 4s¹. How did we determine this?
Similarly, how do we know that the electronic configuration of tungsten is [Xe] 6s² 4f¹⁴ 5d⁴? It could have been 6s¹ 5d⁵ (there is possibility). I'm not looking for the reasons for these exceptional configurations but a detailed explanation of the practical methods to determine the electronic structure of elements.