How to change Player rotation towards an Object?

Hello,
I’m new to Unity and programming, so maybe I’m just making an obvious mistake, thank you for helping!

I want the player to turn to a target (Cube) with a turning Time, when pressing the Mousebutton.

This is my script, which doesn’t work:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class test : MonoBehaviour {


	public Transform player;
	public Transform target;
	private Vector3 _direction;
	private Quaternion _lookRotation;
	public float RotationSpeed;

	void Update(){

		if (Input.GetMouseButtonDown (0)) {
			_direction = (target.transform.position - player.transform.position).normalized;
			_lookRotation = Quaternion.LookRotation(_direction);
			player.transform.rotation =  Quaternion.Slerp(player.transform.rotation, _lookRotation, Time.deltaTime * RotationSpeed);
		} 
	}
}

And this is my window:

Is the code wrong or should I use FirstPersonCharacter instead of FPSController as the Player Transformation?

Also I got parts of the code from here:

Thank you for you time and help!

Please, explain what “does not work”

I guess, you should try
if (Input.GetMouseButton (0)) instead of if (Input.GetMouseButtonDown (0))

GetMouseButton is called while the button is pressed

GetMouseButtonDown is called only the frame when the button goes from released to pressed