Gun tilting in the direction you look towards

Ok so im trying to make my gun tilt left or right depending on which way you turn
Like if you have ever played a game like call of duty where you look right and the gun rotates on the z axis to the right a little bit and goes back to normal again when you stop turning

sorry if i didn’t explain this very well but im not very good at explaining stuff.

im thinking i might have to use Quentonion.Euler but im not sure how?

Thank you every one that commented but I figured it out