How to make an automatic movement?

Hello. I need help.
I want to make my character moves forward automatically(the character stay in the air).
How do I make my character move forward, ignoring the other direction…

I tried code like this:

let unity do That !! go to rigidbody in inspector and freeze the rotation under constraints!!
for example if you want to go in X direction then freeze Z axis and Y Axis!!
107819-download.png

Vector3 forward = transform.TransformDirection(Vector3.forward);

Rb.AddForce(forward * 55);