I want to change the shape by moving the bone along the x axis. how to do it?
when bone x = 0.000. it's a basic shape
when bone x = 1.000. i want to change shape and save it to this state of bone(position x axis)
You could do it with some shapekeys and with a driver:
Create a cube, subdivide it, give it 2 shapekeys (one basis and a second one), keep the second one selected, go in Edit mode and round your cube with AltShiftS (make sure that the factor is at 1 in the Operator box):
Create an armature at the middle of the cube or wherever you want (parent the cube to the armature if necessary). Right click on the shapekey Value of the cube and choose Add Driver:
Then right click again and choose Edit Driver, choose the bone as Object, set the correct Type and Space (here, Local). You can also right click and Open Drivers Editor in order to change the ratio: