So, for me at least, if you understand well why a covariant derivative is defined the way it is presented to you, then $25\%$ of conceptual work is done. I mean, with covariant derivatives (in General Relativity) you can understand a plethora of physics: equivalence principle, geodesics, curvature tensors, geodesic deviation and so on...
In particle physics the role of a covariant derivative becomes relevant not in spacetime, but in fibre bundles. The great conclusion is therefore:
For standard model of particle physics $($with the gauge group given by $U(1)\times SU(2)\times SU(3)$ $)$ the covariant derivative is given by$[1]$:
$$D_{\mu} = \partial_{\mu} -i\frac{g'}{2}YB_{\mu}-i\frac{g}{2}\sigma_{j}W_{\mu}\hspace{0.2mm}^{j}-i\frac{g_{s}}{2}\lambda_{j}G_{\mu}\hspace{0.2mm}^{j}\tag{1}$$ Where $\sigma_{j}$ are the Pauli matrices $($the generators of $SU(2)$$)$, $\lambda_{j}$ are the Gell-Mann matrices $($the generators of $SU(3)$$)$.
In general it is possible to say that the general form of the covariant derivative is:
$$D_{\mu} = \partial_{\mu} -igT_{j}A_{\mu}\hspace{0.2mm}^{j}\tag{2}$$ Where $T_{j}$ are the generators of a given Lie group $G$.
What is bothering me is the term $-i\frac{g'}{2}YB_{\mu}$ in $(1)$, because is quite clear that each term of the covariant derivative "corresponds to a interaction of nature"; $W_{\mu}\hspace{0.2mm}^{j}$ is the gauge field for weak interaction, $G_{\mu}\hspace{0.2mm}^{j}$ is the gauge field for strong interaction.
So my doubt is:
Why the term $-i\frac{g'}{2}YB_{\mu}$ is the correct one and not simply the famous $-iqA_{\mu}$ since for the $U(1)$ (and therefore for electromagnetism) group the covariant derivative is:
$$D_{\mu} = \partial_{\mu} -iqA_{\mu} ? \tag{3}$$
$$* * *$$
$[1]$ https://en.wikipedia.org/wiki/Gauge_covariant_derivative#cite_note-12