NB! It seems this console command is not compatible with CS2.
Command Profile

JOY_INVERTY

CS:GO

This console command is used to set whether you want to invert the Y axis for looking around on a joystick. When this command is turned on, moving the joystick up, or forward, will make your character look down.

Syntax
joy_inverty [0 / 1]

Description

This console command is used to set whether you want to invert the Y axis for looking around on a joystick. When this command is turned on, moving the joystick up, or forward, will make your character look down.

How To Use joy_inverty

  1. Enable the developer console in Counter-Strike settings.
  2. Open the console with the tilde key (~).
  3. Enter joy_inverty [0 / 1], replacing bracketed arguments with the value you want, then press Enter.

This legacy command is not currently listed as compatible with Counter-Strike 2.

Syntax And Arguments

joy_inverty [0 / 1]
0 / 1 Enter a 1 after this command to invert the Y axis, and enter a 0 to leave it as its default setting (moving the joystick forward/up makes your character look up).