How do I make an object follow the mouse?

I want a sphere to be at the mouse cursor’s position 24/7 (unless the level is completed or failed by the means of dying). I want it to only be at the cursor’s X and Y position, as it is a top down view game and I don’t want the object to change height.

I’m using C#.

Set the Transform.position to the Input.mousePosition

What do you mean by that?