How can I get my player to turn?

So, I have recently started on an fps game, but I have already run into a problem. I can’t seem to get my player to turn with the mouse. Everything I search up is outdated. If anyone has an answer to this, thanks in advance.

float rotSpeed;
player.transform.Rotate(0,Input.getAxis(“MouseX”)rotSpeedTime.deltaTime,0);