The waiting period is the period that Sharia made of the woman in two cases: divorce, and the death of the husband.
As for the waiting period for divorce, it is three menstrual cycles if the woman is not pregnant. If she is pregnant, then her waiting period is to give birth, whether it occurred in a month, less, or more than three months.
As for the waiting period for death, it is four lunar months and ten days for a non-pregnant woman. Nine months, her period extended to giving birth.
The waiting period is not necessary to know that she is not pregnant, for this is known from the first menstruation, but it is a devotional command from God Almighty, and we must obey