When to change diaper

Okay so when newborn is going poop how long should I wait to change so I don’t get pooped on while they are still going lol