How to AddDriver the rotation value of the armature for the rotation value of the object
In the drivers editor, variable tab, instead of "single property" use "transform channel" ( (X) Symbol), then choose your bone, choose X rotation with auto euler option, choose world or local space, and when rotating the bone in pose mode, X rotation of the cube will follow.