First open the app that you want to record, (this can be a game or another program,) and make sure that it is selected on the taskbar.
Next, press Win+G (Hold down the Windows Logo key and press G) to open the game bar. If this isn't registered as a game by Windows, you will be asked to verify that it is. (ANY program can be a game!)
When the Game bar is opened, it should look something like this. The button on the far left is your XBOX profile, next is the "Record XBOX" option, then Screenshot, then Record, and finally Settings.
The Record and Screenshot options here are really useful, and fairly self explanatory.
Use this to record whatever you want...
The Snipping tool is another great thing, not for recording gameplay though. It is basically a screenshot tool that only screenshots where you select. Get to it by searching "snip" in the Start menu.
After you capture an image, you can edit it, and reform it all you want inside the Snipping tool. After, you can save the image to wherever to use it in a how to guide, or another program.