1. Horizontal rows: Periods
The maximum number of electrons accommodated in a shell
Now, let’s take a brief but thorough look at how electrons exist using the concept of period. We know that the number of an atom represents the number of electrons and there is a rule for locating electrons in the electron shell. Each shell can hold a certain number of electrons. Electrons fill in order, starting from the shell closest to the nucleus. The first shell, or first energy level, contains up to 2 electrons, the second shell contains up to 8 electrons, and the third contains up to 18 electrons. (If the number of shells is n, the maximum number of electrons is 2n2 ). We will talk about the reason for this in later part in the orbital. Starting from the first shell closest to the nucleus, they are also called K, M, L, N, etc. shells.
Uncertainty principle and Quantum mechanics
The uncertainty principle was formulated by German physicist Werner Heisenberg in 1927. It states that there is a limit to measure precisely both the position and momentum of electrons at the same time at the microscopic scale, such as atoms and subatomic particles. That is, in other words, the more accurately we know the position of a particle, the less accurately we can know its momentum, and vice versa. Particles such as electrons, which have a very small mass and move rapidly, not only have the properties of the particle itself but also have the properties of a wave. Because of this wave-particle duality of particles, the electron's exact orbit cannot be determined until observed, since it exists as a wave before we observe it, but the moment we observe it, it becomes a particle. This concept is precisely the essence of quantum mechanics. Quantum mechanics is a physics that does not clearly indicate existence but rather indicates existence probabilistically. At this point, our familiar common sense lost its way. I have been fascinated by quantum mechanics and studied it a lot, but I wonder why it seems the more I dig into it, the farther it drifts away.😅
Orbital; subshell
Going back to the concept of an electron shell, the physical region or space where electrons can exist within the shell is calculated and expressed as a probability distribution and then expressed as a 3D shape in 3D coordinates space. We call this "orbital". An orbital is also referred to as a wave function. In other words, orbitals are the concept of subshells within an electron shell, and they can predict the position of an electron up to about 90% accuracy. It is important to note that orbitals are different from the orbits of planets around the sun. It should not be confused.
It is easy to guess that as the number of shells increases, the radius increases, so the types of orbitals that can exist within them also become more diverse. The farther away from the nucleus, the greater the energy, and electrons fill up the orbitals in order of increasing energy starting from the smallest. Each shell has one or more orbitals(subshells), and the types of orbitals include s, p, d, and f. Electrons are filled into these orbitals in a specific order. By analogy, some texts compare atoms to hotels, electron shells to floors, and orbitals to rooms. This analogy can be a helpful way to understand the concept although it is not perfect in that, for example, p orbital has 3 individual orbitals(rooms). In each room (orbital), a maximum of two electrons can occupy, and they must have opposite spins (Pauli's exclusion principle). If only one electron occupies a room, it will have an "up" spin. (Refer to the electron configuration within the orbital for each period below). Let’s take a brief look at each orbital.
s orbital
p orbital
d orbital
f orbital

The Electron configuration notation
Let's take a closer look at how atoms bound to each period across the periodic table fill orbitals for each shell.