How to Reward Players with XP in D&D 5e

My number one pet peeve is playing through several hours of a game with friends and then finding out at the end that no experience points, or very few experience points, were earned.

This happens most often because a dungeon master doesn’t know how to give experience points and only gives out XP for combat. (This also creates the problem DMs complain about where your players become murder hobos…