Range rotation from -90 to 90

hi for everyone! please, help with question
a have a script: the cannon turns where my camera turns. how to range cannon rotation from -90 to 90 degrees? sorry for my English

 public float speed;
        public Transform cannon;
        public int mainCameraCurrentRot;
        private Quaternion zeroRot; 
        
        void Start()
        {
                zeroRot = cannon.rotation; 
        }
        
        void LateUpdate()
        {
                mainCameraCurrentRot = (int)mainCamera.transform.eulerAngles.y;
                cannon.rotation = Quaternion.Slerp(cannon.rotation, zeroRot*Quaternion.AngleAxis(mainCameraCurrentRot, Vector3.forward), speed * Time.deltaTime);                
        }

Make a variable cannon_angle and make sure its between -90 and 90.

Then use the following code to set the cannon at that angle.

cannon.localRotation=Quaternion.identity;
cannon.Rotate(Vector3.up, cannon_angle, Space.Self);