How do we write a C# script to smoothly rotate objects based on Input.GetAxis("Mouse *")?

I wrote this script on my own and it works fine. However, it cannot rotate objects smoothly. How can make it so it can rotate the object and its parent smoothly?

I use this script to rotate my camera vertically and its parent horizontally:

public class MyCamera : MonoBehaviour {
	public float rotationSpeed = 100;
	public Transform parent;
	
	void Update() {
		transform.localEulerAngles += new Vector3(Input.GetAxis("Mouse Y") * rotationSpeed * Time.deltaTime, 0, 0);
		parent.transform.localEulerAngles += new Vector3(0, Input.GetAxis("Mouse Y") * rotationSpeed * Time.deltaTime. 0);
	}
}

Read the docs, euler angles/ local euler angles isn’t suitable for the job. Use Transform.Rotate instead. Everything else looks fine for me.