The spark plug wire can be shortened and a new spark plug clip crimped onto the wire. A lot of Briggs ignition modules come with the wire too long and come with an extra clip in the box in case length adjustments need to be made.
I have a brand new mower where the cable pulled out if the boot. I stuck the cable back in and it started. Is there a way to repair or do I have to replace the entire assembly including the magnet armature?
No you just buy a new boot
If the cable is long enough cut 1/4" off the end & fit new boot
If cable is short fit a longer boot
I often fit Honda boots ( we call them caps down here ) because they come with a 1 piece handle to prevent pulling it off again and the boot screws into the HT cable which gives you near an extra inch .
Looks like this one generac boot