Technically, an autoexec in CS2 is a configuration file that keeps specific commands to activate custom game settings. It’s a simple text file that should be saved in a proper folder with the .cfg extension. When you launch Counter-Strike 2, the game checks everything in your autoexec.cfg...
If you create a config file named autoexec.cfg, this file should - as the name indicates -automatically execute whenever you launch CS2. For this reason, many people place the commands they wish to run every time they launch the game in a file called autoexec.cfg. ...