Rig Cable connected to head and body
You should use the Stretch To constraint:


Build your cable, create an armature, with a small bottom bone, a central bone as long as the cable, and a small top bone that you unparent.





Select the armature, go in Edit mode, in the Properties panel > Object Data > Display, choose B-Bone. Select the central bone and in the Properties panel > Bone > Bendy Bones, segment your bone (for example 6).





Switch to Pose mode, keep the central bone selected, in the Properties panel > Bone Constraints give it a Stretch To constraint with the same armature as Target and the top bone as Bone.





Back in Properties panel > Bone, enable Use Custom Handle References and in the In and Out fields choose the bottom bone and the top bone so that the central bone will bend properly.





Parent the cable to the armature With Automatic Weight.





Move the top bone, the cable should follow.





What you could do to give it the right bend is to put an empty at the exact same position as the top bone, give the top bone a Child Of constraint, then move the empty to where it is supposed to be in the back of the head and parent it to a bone.