How can I change Z rotation of a FPS player ?

Well I am challenged by making my player tilt his body, so I should change the Z rotation(when I press Q or E), but have some issues whit it because my camera moves really questionable while I am pressing Q or E and moving the mouse. Here is some part of the code:
if (Input.GetKey(KeyCode.Q))
{
playerController.transform.rotation *= Quaternion.Euler(0, 0, 20 * Time.deltaTime * 10);

        Quaternion t = playerController.transform.rotation * Quaternion.Euler(0, 0, 20 * Time.deltaTime * 10);
        if (t.eulerAngles.z > 20)
        {
            t = Quaternion.Euler(t.eulerAngles.x, t.eulerAngles.y, 20);
        }

        playerController.transform.rotation = t;

    }

The Z axis is depth so if you rotate that it will move from side to side.

What i Always do if i want to rotate something is use eulerangles. This is how i would use it:

vector3 rotation = transform.eulerangles;   
rotation += new nector3(0f, 0f, //whatever you wish to set the Z axis. this will be added);    
transform.eulerangles = rotation;

if i have a variable for the Z axis then i can use whatever i want like ‘Q’ or ‘E’ or mouseInput to set how fast or how far i want the Z axis to be. If the value is below 0 it will work as well. I don’t deal with quaternions since they are pretty hard to understand for me.

I hope this answer is helpful. if not then let me know.