help with this rotation script please

trying to get this script to work rotating a cube smoothly on x and y with max and min clamps on y axis, cube dont want to react, cant seem to get it to move, any help much appreciated thank you

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NewBehaviourScript : MonoBehaviour {




    public GameObject GUN;

        public float stationaryRotationSpeed = 170.0f;
        public float _hor = 0f;
   
        public float _easeStrength = 0.001f;
   

        public float RSPEED = 170.0f;
        public float ROL = 0f;
        public float ACCEL = 0.001f;
        private float MINANGLE = 280;
        private float MAXANGLE = 358;
        float k = 0.0f;
    Vector3 myRotation;

    // Use this for initialization
    void Start () {
        myRotation = GUN.transform.rotation.eulerAngles;
        myRotation.x = MAXANGLE;
    }
   
    // Update is called once per frame
    void Update () {


var p = Input.GetAxis("Mouse X");

   
         _hor = Mathf.Lerp(_hor, p, _easeStrength);
      
            float rotation = _hor * stationaryRotationSpeed * Time.deltaTime;
            GUN.transform.Rotate(0, rotation, 0);






            var k = -Input.GetAxis("Mouse Y");
ROL = Mathf.Lerp(ROL, k, ACCEL);
float ROTATION = ROL * RSPEED * Time.deltaTime;
myRotation.x += ROTATION;
myRotation.y += rotation;                       
myRotation.x = Mathf.Clamp(myRotation.x, MINANGLE, MAXANGLE);
GUN.transform.eulerAngles = myRotation;




    Vector3 eulerAngles = GUN.transform.rotation.eulerAngles;
        Debug.Log("GUN.transform.rotation angles x: " + eulerAngles.x + " y: " + eulerAngles.y + " z: " + eulerAngles.z);

    }
}

If I understood your problem correctly, then this is the script for smoothly rotating object with clamping on x axis. Rotation numbers in inspector will be different, as it is quaternion rotation.
Because I don’t have a mouse, I used “Horizontal” and “Vertical” instead.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NewBehaviourScript : MonoBehaviour
{
    [SerializeField] float rotationSpeed = 180f;
    [SerializeField] float minDegree = 280f;
    [SerializeField] float maxDegree = 358f;

    Transform t;
    float xRot;
    float yRot;

    private void Awake()
    {
        t = transform;
    }
    private void Update()
    {
        Rotate();
    }
    void Rotate()
    {
        //Sign the axis of rotation and the rotation speed
        xRot += Input.GetAxisRaw("Vertical") * rotationSpeed * Time.deltaTime;
        yRot += Input.GetAxisRaw("Horizontal") * rotationSpeed * Time.deltaTime;

        //Make min and max variables of type Quaternion
        var minQ = Quaternion.identity;
        var maxQ = Quaternion.identity;

        //Assign Vector3 euler angle as Quaternion
        minQ.eulerAngles = Vector3.right * minDegree;
        maxQ.eulerAngles = Vector3.right * maxDegree;

        //Put their x value into float variable or put them directly into Mathf.Clamp
        var min = minQ.eulerAngles.x;
        var max = maxQ.eulerAngles.x;

        xRot = Mathf.Clamp(xRot, min, max);
      
        //First assign rotation to intermediate variable for y axis
        var yDelta = Quaternion.Euler(Vector3.up * yRot);

        //Assign combined y and x axis rotations to gameobject rotation.
        //Quaternions need multiplying when adding together!
        t.rotation = yDelta * Quaternion.Euler(Vector3.right * xRot);
    }
}