You can wait to change a dirty diaper for as long as 10 to 15 minutes or up to 30 minutes if needed.
Dirty poop diapers should be changed as soon as you notice and as soon as you can but you should give the baby or toddler around 10 to 15 minutes to finish pooping.
I learned this myself when I would immediately change my baby and toddlers diaper right after pooping my youngest pooped on me during a diaper change and my oldest would poop again within a few minutes of changing his diaper.
So I started waiting at least 10 to 15 minutes after they pooped before changing their diaper to allow them time enough to finish pooping.
With wet diapers you can wait a few hours or so between changing them as the disposable diapers will absorb the pee and hold it away from the skin.
There's no need to change a wet diaper right away.
If the toddler is sleeping through the night or poops during a nap you can let the poop diaper stay on until they wake up.