How do I lock both the X and Z axis on my player?

I have my player successfully rotating and moving with full WASD movement but I have 1 problem that I cannot find. How can I lock both the X and Z axis on my player? Whenever I run into an object my player falls over. BTW I am not good at coding. I need my player to rotate on the Y-axis.

If your player is using a Rigidbody for gravity you can freeze axis rotation under Constraints.

Capture

Thank you so much I had completely forgotten about that and even searching it up didn’t help so thank you.