How to make player only go in 4 directions?

Greetings, I would like to know how to make a 3rd person controller move in ONLY 4 directions (Right,Left,Backwards,Forewards)And not turn diagonally as I am making a game that wouldn’t work that well if the player could move diagonally.![1]
**

player.transform.position += player.transform.forword; (-=) (right)