Firstly, click on start in your Windows 10 and then type Xbox. Once done, just open the Xbox.
Once you are in the Xbox, press combination of keys on your keyboard that is Win + G. You can do this on the screen you want to record. The moment you press this combination, a popup will appear asking you for that is it a game ? Just click on Yes, it is a game.
You will notice few options that are Screenshot, Start Recording and Settings.
Choose the Start Recording and the recording will get started. Once done, stop the recording.