How do I tilt the camera when turning the mouse on the x axis?

Hi. Tell me how to make sure that when I rotate my mouse horizontally (x-axis), depending on the direction in the camera tilts to the left and right. And when there is no rotation, does the camera turn back to its original position? My code on screenshot