How do I make my player face the mouse on the Y axis in Unity C# 2D?

I have a c# script to make my player move towards the mouse but I need it to rotate to face the mouse. I have never dealt with these types of controls before and I’ve been trying for a long time to figure it out.

Here is my script:

using UnityEngine;
using System.Collections;

public class playerController : MonoBehaviour
{
private Vector3 _target;
public Camera Camera;
public bool FollowMouse;
public bool ShipAccelerates;
public float ShipSpeed = 2.0f;

 void Start()
{
    
}

public void OnEnable()
{
    if (Camera == null)
    {
        throw new System.InvalidOperationException("Camera not set");
    }
    

}

public void Update()
{
    
    if (FollowMouse || Input.GetMouseButton(0))
    {
        _target = Camera.ScreenToWorldPoint(Input.mousePosition);
        
        _target.y = 0;
    }
    
    var delta = ShipSpeed * Time.deltaTime;
    if (ShipAccelerates)
    {
        delta *= Vector3.Distance(transform.position, _target);
    }
   
    transform.position = Vector3.MoveTowards(transform.position, _target, delta);

   

}

thank you so much for helping!

public Vector3 lookAtTargetPos;

void Update() {
     lookAtTargetPos= Camera.main.ScreenToWorldPoint(Input.mousePosition);

	     if(lookAtTargetPos != Vector3.zero) {
			Quaternion rot = Quaternion.LookRotation(transform.position - lookAtTargetPos, Vector3.up);
			transform.rotation = rot;
			transform.eulerAngles = new Vector3 (0, transform.eulerAngles.y, 0);
		}

}