Generally if something is turning, then SOMETHING is making it turn, so you need to laser focus on that and nothing else. By focus I mean on strip EVERYTHING off that player and put it all back on one at a time until you figure out what is turning it.
Getting a player walking properly should not be this big a slog. There’s like ten billion Youtube tutorials for it.
Do you NEED the player to have a Rigidbody? Because if not, this is a fully-operational player controller:
That one has run, walk, jump, slide, crouch… it’s pretty full-featured, but it is NOT Rigidbody-based.