When looking at your fill order of electrons is:
1s
2s 2p
3s 3p 3d
4s 4p 4d 4f
5s
etc.
Group 1A (1) the alkali metals all end is s1. What period the element is in determines the 1st number.
Example: H ends in 1s1 (even though H is not a metal it resides in this group because it also has one valence electron)
Li ends in 2s1 (lithium is in period 2)
Na ends in 3s1 ( sodium is in period 3)
Group 2 (2A) the alkaline earth metals all end in s2
Group 3A or 13 all end their electron configurations in p1. Boron ends in 2p1.
In group 4A or 14 all elements end in p2. And so it goes.
For the transition metals groups 3-12 there are many exceptions. The general rule is that the element’s electron configuration ends in d and whatever place they are in. Scandium would end in 3d1 titanium in 3d2 etc. The transition metals are behind by one period because the d electrons are high in energy.
For the rare earth elements (the Lanthanides and Actinides) they end in f. Lots of exceptions here too. Cerium would end in 4f1 Pr in 4f2. These rare earth metals are 2 periods behind because the f electrons are even higher in energy than the d electrons.
The s block on are groups 1 and 2; they end in s1 and s2.
The p block on the periodic table are groups 13-18 and end in p1 etc.
The d block on the periodic table are groups 3-12 make up the d block and the elements’ electron configurations end in d.
The f block on the periodic table are the Lanthanide and Actinide series.
Good luck and have a great day!!