To enable the developer console in CS2, you can access the game's settings and modify the relevant option. Additionally, if you're using the Steam client, you can add the launch options '-console' or '-dev' in the 'General' tab under 'Properties'.