I’ve seen two different ways these attach.

The first is spring clip that goes over the entire ball stud, It just pops on/ off. The second is a thin wire that slides up into the cup on the strut that locks the ball in place. They are interchangeable with each other and very easy to replace.