Tell signal loss from a black game window
Open your monitor's own menu. If it says No Signal, check whether it sees the HDMI or DisplayPort input. Out of Range means the monitor received a display mode it cannot show. If the input stays active and the monitor reports a resolution while only the game image is black, troubleshoot the game's black screen instead.
Test the display mode switch
Press Alt+Tab. If the desktop returns, open Windows Settings → System → Display → Advanced display and check the resolution and refresh rate for the affected monitor. Choose a refresh rate Windows supports at the current resolution. Once you can see the CS2 menu again, select fullscreen windowed mode and relaunch. If the issue disappears, check the resolution and refresh rate previously selected for fullscreen mode.
If the desktop is also gone
Make sure the monitor is on the connected input. In Windows, try Win+Ctrl+Shift+B to reset the graphics driver. If the signal also drops outside CS2, reseat the cable and test another cable or port, changing one thing at a time. If one cable only fails at a higher refresh rate, repeat the test at a lower rate and record which mode loses the signal.