Firstly you probably want to convert the mouse position to a world position. You can do this with Camera.ScreenToWorldPoint.
Transform.Rotate will rotate by a given angle, not towards a target. That’s why it’s always rotating one direction. Vector3.RotateTowards should do what you describe. You can pretty much copy the example from the documentation.