Depending on the age of the baby it can be normal for a baby to not pee all night.
Newborn babies should be peeing through the night and should have at least one wet diaper by morning and if not then something is wrong such as the baby being dehydrated.
As the baby gets to 6 months of age and above then they may go all night without peeing and that can be normal.
My 1 year old who is now 8 years old stopped peeing on some nights when he was 8 months old and I took him to the doctor because he has no wet diapers in the morning.
But he would then pee around 30 minutes after waking up.
So he was holding in the pee through the night and then would pee when he felt the urge.
So I only had to change his diaper 30 minutes or so after he woke up.
If your baby is under 8 months old though and not having wet diapers through the night then I would take them to the doctor for a checkup just to be safe.
But some babies can go all night without peeing.
Also as a kid gets to 2 years old and above they may stop peeing as often and keep a diaper dry for 1 to 2 hours before they actually pee.
So if you check your 2 year old's or 3 year old's diaper every 1 hour or 2 hours and it still is dry then that can be normal.
My kid used to hold it until 2 hours later and then pee all at once.
So he only needed a diaper change every 2 to 3 hours and would only go through 3 to 4 diapers per day.