The trick here is to realize that although this specific electron configuration is possible in theory, it doesn't actually take place in practice.
I'll show you how to find the element that could have this electron configuration first.
As you know, a neutral atom has equal numbers of protons in its nucleus and of electrons surrounding its nucleus. This means that you can find the element's atomic number, which of course tells you the number of protons it has in its nucleus, by counting how many electrons are included in its electron configuration.
In this case, the number of electrons used will be
#overbrace(2)^(color(red)(1^"st" "energy shell")) + overbrace(2 + 6)^(color(blue)(2^"nd" "energy shell")) + overbrace(2 + 6 + 4)^(color(green)(3^"rd" "energy shell")) + overbrace(2)^(color(orange)(4^"th" "energy shell")) = 24#
Now, the reason I said that this is a trick question is because chromium's actual electron configuration is
#"Cr: " 1s^2 2s^2 2p^6 3s^2 3p^6 3d^5 4s^1#
or, using the noble gas shorthand notation
#"Cr: " ["Ar"] 3d^5 4s^1#
Now, why is this the case with chromium? This excellent answer covers exactly why that happens
You can also check out this answer
So, to sum this up, use the method I showed you to find the atomic number of the element that has that many electrons in its electron configuration, but keep in mind that some transition metals do not have electron configurations that follow the Aufbau Principle in the classic sense.