X-axis Mirror does not work properly
X axis mirror is mirroring along X axis considering the origin point of the object (mesh or armature) is the center of the mirror:



As your armature seems to be centered around the world center, you can


Snap the 3D cursor to the center ShiftS then cursor to center
Then transform the origin point of your armature using the menu in object mode: object/transform/origin to 3D cursor




If the world center was not the center of your armature, you can use other snapping options to place it where needed.