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

CL_USE_NEW_HEADBOB

CS:GO

This command dictates whether or not your head bobs as you run. It can't be adjusted in matchmaking, but you can in private servers with cheats.

Syntax
cl_use_new_headbob [0 / 1]

Description

This command dictates whether or not your head bobs as you run. It can't be adjusted in matchmaking, but you can in private servers with cheats.

Syntax And Arguments

cl_use_new_headbob [0 / 1]
0 / 1 Use a 0 after the command to turn off head bobbing, giving you a much smoother experience as you run. Use a 1 after the command to turn head bobbing on.