Shooting at mouse position third person camera

Hi! I have a third person camera and want to shoot a bullet in mouse direction, right now my bullet only shoots in front of my block, how do I shoot in mouse direction? thats my Code for the playercontroller:

public GameObject shot;
  public Transform shotSpawn;
  public float fireRate;
  private float nextFire = 0.0f;
 
  void Update ()
  {
      if (Input.GetKey (KeyCode.Mouse1) && Time.time > nextFire && Menu==false) {
          nextFire = Time.time + fireRate;
          Instantiate (shot, shotSpawn.position, shotSpawn.rotation);

and I added a velocity script to my bullet:

public float mspeed;
  
  void Start () {
      GetComponent<Rigidbody> ().velocity = transform.forward * mspeed;
  }

Can someone please explain how I change the transform to the Mouse position please?

You just need to instantiate the object at the camera position with some velocity, something like

newProjectile = Instantiate(projectile, Camera.main.transform); (something like this)