We show that the Standard Model electroweak interaction of ultrarelativistic electrons with nucleons (\(eN\) interaction) in a neutron star (NS) permeated by a seed large-scale helical magnetic field provides its growth up to \(\gtrsim 10^{15}\thinspace\text{G}\) during a time comparable with the ages of young magnetars \(\sim 10^4\thinspace\text{yr}\). The magnetic field instability originates from the parity violation in the \(eN\) interaction entering the generalized Dirac equation for right and left massless electrons in an external uniform magnetic field. We calculate the averaged electric current given by the solution of the modified Dirac equation containing an extra current for right and left electrons (positrons), which turns out to be directed along the magnetic field. Such current includes both a changing chiral imbalance of electrons and the \(eN\) potential given by a constant neutron density in NS. Then we derive the system of the kinetic equations for the chiral imbalance and the magnetic helicity which accounts for the \(eN\) interaction. By solving this system, we show that a sizable chiral imbalance arising in a neutron protostar due to the Urca-process \(e^-_\mathrm{L} + p\to N + \nu_\mathrm{eL}\) diminishes very rapidly because of a huge chirality flip rate. Thus the \(eN\) term prevails the chiral effect providing a huge growth of the magnetic helicity and the helical magnetic field.