Gauge symmetries are internal symmetries of the field that we are considering.
So, instead of "symmetry of the wave function" we study the symmetry of the Lagrangian of the field. The Lagrangian should be invariant under Lorentz transformation and gauge transformation.
U(1) symmetry is a phase with a tweak. In QFT, it is claimed that the Lagrangian should be invariant under LOCAL gauge transformation. This word "local" is very important and it has important consequences.
Let's look at the local U(1) and $SU(2)_L \times U(1)$ gauge transformations
Local U(1):
$\mathscr{L_o} = i \bar{\psi} (x) \gamma^\mu \partial_\mu \psi (x)$
This is Dirac Lagrangian, as you can easily check it is invariant under $\psi \rightarrow e^{iQ\theta} \psi$ (global U(1) transformation). However, it is not invariant under $\psi \rightarrow e^{iQ\theta (x)} \psi$ (local U(1) transformation). Note that in the later $\theta(x)$ is a function of the $x$
This means that we need to change our Lagrangian such that it remains invariant under local U(1).
Let's define the Lagrangian as follow.
$\mathscr{L} = i \bar{\psi} (x) \gamma^\mu D_\mu \psi (x) \;\;\;\;\;\;\;\; Eq.A$
where $D_\mu = \partial_\mu + ieQA\mu(x)$ and $A_\mu(x)$ (which is a new field we are introducing into the theory) transforms as $A_\mu(x) \rightarrow A_\mu(x) - \frac{1}{e}\partial_\mu \theta(x)$ under U(1).
Eq.A is now invariant under LOCAL U(1) and if you expand it you will get,
$\mathscr{L} = \mathscr{L_o} - eQA_\mu(x) \bar{\psi} (x) \psi(x)$
because we required the Lagrangian to ne invariant under LOCAL U(1) , we found the interaction of the $\phi (x)$ field with a new field $A_\mu (x)$ which is photon.
Local $SU(2)_L \times U(1)$:
Let,
$\psi(x) = \begin{pmatrix} \nu_e \\ e\end{pmatrix}_L$
where $\nu_e$ is a electron neutrino field and $e$ is electron field and $L$ means that we are only looking at the left-handed ones.
$\psi(x)$ transforms like
$\psi(x) \rightarrow exp(iy_1\beta(x)) exp(i\frac{\sigma_i}{2}\alpha^i(x))\psi(x) $
where $exp(iy_1\beta(x))$ is the U(1) transformation $exp(i\frac{\sigma_i}{2}\alpha^i(x))$ is a $2\times 2$ matrix of SU(2) because $\sigma_i$ are Puili matrices.
A Lagrangian which is invariant under Local $SU(2)_L \times U(1)$ is.
$\mathscr{L} = i \bar{\psi} (x) \gamma^\mu D_\mu \psi (x) \;\;\;\;\;\;\;\; Eq.B$
where $D_\mu$ is,
$D_\mu = \partial_\mu + ig \frac{\sigma_i}{2}W_\mu^i(x) + ig'y_1 B_\mu (x)$
where three $W_\mu^i$'s and $B_\mu$ are four new gauge fields (boson fields) which will correspond to photon, W+, W- and Z bosons. (I will leave it to you to figure out how they tranform under gauge transformation)
Local gauge invariance gives us all the interactions between fermions and bosons in SM. The interaction between the bosons come from the fact that these new boson field do not commute with themselves (non-Abilian groups).
For more info read this: The Standard Model of Electroweak Interaction by A.Pich