Animation no centered

I want to animate a square but I want it to be centered and not have the animation start at the bottom right like the video! I’ve tried every possible setting but nothing works. Can anyone help me? I’m having exactly the same problem with a text

Thanks for your help