Cinemachine Camera Point to Mouse

I have tried multiple times but have always encountered the same issue when trying to point my cinemachine camera toward my mouse. Every time I set the cinemachine camera to look at an object that is controlled by my mouse, it will start spinning around even when I am not moving my mouse.

Here’s the code I used:

public class MouseLocate : MonoBehaviour
    public Vector3 screenPos;
    public Vector3 worldPos;

    void Update()
        screenPos = Input.mousePosition;
        screenPos.z = Camera.main.nearClipPlane + 1;

        worldPos = Camera.main.ScreenToWorldPoint(screenPos);

        transform.position = worldPos;

The script is hooked up to a sphere but will violently spin the camera around.

I have tried other methods like using it on a normal perspective camera and different ways to get the position of the mouse, but none have worked.