Text this: Solving the electron and muon $$g-2$$ g - 2 anomalies in $$Z'$$ Z ′ models