The nurses in the postpartum ward taught me how to change diapers. Surprisingly, none of the first page or so of google results has all of these tips. So I will type up my notes in case they are useful to anyone else.
Change immediately if you see a stool or if the baby seems unhappy. If the baby is not unhappy, it is okay to leave a wet diaper for a few hours. If the baby is having trouble sleeping, it may be better to leave the diaper wet than to wake the baby for the diaper change.
To check for stool, pull back the leg cuff behind the baby’s butt and look inside. Large stools may be visible from the outside: the diaper will distend.