Make oject to look where your mouse is

Im making top down shooter where you can only stand and aim , whats the best way to do that , I need to make player look where my mouse is on only one of the axis . Thanks in advance , PLS C# only .

Camera.ScreenToWorldPoint

Transforms position from screen space
into world space.

 Vector3 worldPoint = Camera.main.ScreenToWorldPoint(Input.mousePosition);

 transform.LookAt(new Vector3(worldPoint.x, worldPoint.y, transform.localPosition.z));   // XY
 //transform.LookAt(new Vector3(worldPoint.x, transform.localPosition.x, worldPoint.z)); // XZ