If the baby or toddler has a wet diaper before the nap then it's best to change the diaper before the nap.
However if the babies or toddlers diaper is only slightly wet then you can wait until after the nap to change the diaper.
I've done both with my kids and the older kids that were toddler age and around 2 to 3 years old I could let them sleep for their nap and then after the nap I would change the diaper.
Sometimes they would pee during the nap and sometimes not.
Babies under 18 months of age may need a diaper change before and after the nap while older babies and toddlers pee less and need less diaper changes.
As your toddler gets older they begin holding in their pee longer before they pee.
So it's normal for a 2 year old, 3 year old and even 4 year old to have a dry diaper for a few hours before peeing.
When my kids were 3 years old they would sometimes only need 2 to 3 diaper changes per day and some days they needed a few more diaper changes.
For bedtime you should change the diaper if wet so that they have enough room in the diaper through the night for pee.
Some babies and toddlers pee a lot through the night and can overfill even a dry diaper.