Check whether Steam saved the screenshot
Press F12 in the CS2 menu, then open the game's screenshots in your Steam Library. If the new image is there, capture is working. Check notification settings if you expected a popup.
Check the shortcut
Open Steam's In Game settings and check the screenshot key. If F12 triggers a system action on your keyboard, try Fn+F12. You can also assign a spare key temporarily and repeat the test.
Try another Steam game
Check that the overlay is enabled globally and in CS2 Properties, then restart the game. If screenshots also fail in another Steam game, check the client and keyboard settings.