To try it, press Win + G. This opens an interface with all sorts of tools useful to gamers; the one you’re looking for is ...
The Snipping Tool is easiest, but there's also Game Bar and screen recorder apps like ShareX This article explains how to ...