Some designs to make a wrist use a rarer LEGO "turntable" piece; but I modified a 40 tooth gear to do the same. The 40 tooth gear is easier to find (many LEGO sets include a 40 tooth gear which you can modify; or you can buy a modified version from me.)
40 tooth LEGO gears. My modified gear (RED arrow) on left. And a regular LEGO gear (GREEN arrow) on the right:
The wrist itself is connected to the 40-tooth gear's off-center holes and rotates only when the gear is turned by rotating the gear by the gear's 40 teeth (not by the center axle thru the middle of the gear).
Picture of wrist with red showing rotation of axle to open close the gripper/fingers; the green arrow shows rotation of the axle to rotate the wrist: