I want to move this square in after effects, but when I created more than two keyframes I got this curved path. Can anyone help?
Basics. Read the help on keyframe interpolation and how to manage it.
Simply select your second square point to reveal both anchor handles. Then drag each anchor handle end into the middle of the square to make a straight line edge. Repeat this on the third square too.