rotate object on its axis base on x mouse movement

Hi, im making a tank turret that rotate on its axis with the mouse x :

i mean that if i move my mouse on the x axis the turret will spin around on its y axis

do anyone have an idea?

try something like this

float xRotation;
    float mouseX = Input.GetAxis("Mouse X");
    
    xRotation += mouseX;
    
    Turret.LocalRotation = Quaternion.Euler(Vector3.up OR transform.up * xRotation * Time.deltaTime);

hope it helps