Stabilize Bone with IK (while animated)

Is there a way to keep a bone at the same relative position while its animated like in the video (left hand is stable while forearm is moving)

Video:https://www.youtube.com/watch?v=8sRbhSal55Q&t=2s

Attach the IK effector to a socket on the weapon (probably with an offset).

Do you mean the two bone IK

Yes, that’s what I mean

do you know how i can do a weapon sway with Rotation of bones