The recommended requirement for CS2 is 16 GB RAM, while 8 being the minimum but still CS2 can be run over 4GB RAM, you might face issues like lower frame rates (fps) for it will take more time for your RAM to render frames and CPU heating, though you'll need to have minimum background processes running for better optimization. You can check better at this website by uploading your PC specs: Check Here
You have not mentioned your CPU processor and Graphic card specs, a higher processor and Graphic card can highly assist in compensating the lack of RAM.
Well here I don't think the issue is with the RAM and as well a lot of other factors like GPU, Proper Cooling, etc should also be considered, My personal recommendation would be to try reinstalling the game and also getting an RAM upgrade for 4GB is too less for the software and games of this era.