Short answer
$\mathrm{s}$ electrons of alkali metals and alkali earth metals perceive relatively low central electrostatic charge, because of shielding the kernel by inner electrons. They are also farther from the kernel, compared to 1s electrons of hydrogen and helium, what overall leads to low ionization energy of such electrons and high reactivity of such atoms.
Helium and hydrogen have no inner electrons to shield the kernel and their 1s orbitals are smaller, compared to respective higher s orbitals So their ionization energy, especially for helium, is high, and reactivity reciprocally low.
For these reasons and the ones more described below, there is significant decreasing trend in ionization energy of ns electrons of group 1 and2 elements ( values approximated):
$\ce{H}$ $\pu{13.6 eV}$
$\ce{He}$ $\pu{24.7 eV}$
$\ce{Li}$ $\pu{5.3 eV}$
$\ce{Be}$ $\pu{9.3 eV}$
$\ce{Na}$ $\pu{5.1 eV}$
$\ce{Mg}$ $\pu{7.8 eV}$
$\ce{K}$ $\pu{4.3 eV}$
$\ce{Ca}$ $\pu{6.1 eV}$
leading to respective reactivity.
$\mathrm{p}$ electrons of chalkogens and halogens perceive relatively high central electrostatic force, leading to the high ionization energy of such electrons and relatively high electron affinity and because that also high reactivity of such atoms.
Longer answer
Classical case of electrostatics
There is the well known rule from electrostatics, that if there is a system of charges with perfect spherical symmetry, it acts toward its neighbourhood like if it were a point-like charge with the effective charge equal to the sum of charges.
If we have such a system with point-like central big positive charge and negatively charged spherical layer with spherically symmetric charge distribution, the central positive charge is shielded/screened by the outer negative charge of the layer, so the system neighborhood perceives much lower central charge than it really is, i.e. the difference of both charges.
Multielectron atomic quantum models
Statistical distribution of electron density around atomic kernels follows wave functions called orbitals(*). The electron density and related charge distribution is not therefore spherically symmetric. Orbitals also spatially overlap and go sideways, what is further worsening the screening of the kernel charge.
The overall decreasing of screening efficiency goes in order s, p, d, f. Also, electrons from inner "shells"/"subshells" perform better screening then electrons with the same shell or subshell.
It has the consequence the overall kernel screening and electron energy depends on particular atomic electron configuration. For more you can read about Slater's rules.
Atoms with a new principal quantum level just started being filled, like alkali and alkali earth metals, have the screening by inner electrons particularly good. Therefore these $\mathrm{ns}$ electrons perceive particularly low effective kernel charge.
This has few consequences:
The last occupied s orbital is particularly big - see atomic radii.
The electrons in the last occupied s orbital have particularly high energy ( compared to other atoms ).
High electron energies lead to favourable chemical bonding, releasing energy, for covalent bond cases like $\ce{R-Mg-X}$ or $\ce{R-Li}$
High electron energies lead to easy ionization due low ionization energy , which can be more than compensated by lattice ionic energy of solid salts, or by hydration energy in water solutions.
Similarly, elements with just few missing p electrons like halogens or chalkogens have for these electrons poor kernel shielding. This leads to a high effective kernel charge and significant amount of energy released by capturing extra electron to form anion or polar covalent bond. The related term is electron affinity.
(*) Note that the term orbital has 3 major, related but distinguished meanings:
orbital(1) - a wave function as the particular solution of the Schroedinger's quantum wave equation
orbital(2) as a quantum state of an electron, belonging to orbital(1)
orbital(3) as a 3D region(or 3D surface/shape), describing the region of significant probability of electron occurance (or its border threshold value), belonging to orbital(1,2)