I am trying to animate an object with a very simple animation but it does not work
I think you accidently set your animation to constant interpolation(documentation).
You can make the cube move(not teleport) by setting interpolation by setting interpolation to linear or bezier. To set the interpolation, select the animation point or points(Diamond shape in timeline), press t and select linear or bezier.