I think it’s one or the other, whichever comes first. Three is also a third type, and that is in case of birth of the child. If the woman is pregnant when the husband died or divorce happened, and woman ended up giving birth the very next day, her iddat is over the same day
1-And those who are taken in death among you and leave wives behind - they, [the wives, shall] wait four months and ten [days]. And when they have fulfilled their term, then there is no blame upon you for what they do with themselves in an acceptable manner. And Allah is [fully] Acquainted with what you do. (234)
**
2-Divorced women** remain in waiting for three periods, and it is not lawful for them to conceal what Allah has created in their wombs if they believe in Allah and the Last Day. And their husbands have more right to take them back in this [period] if they want reconciliation. And due to the wives is similar to what is expected of them, according to what is reasonable. But the men have a degree over them [in responsibility and authority]. And Allah is Exalted in Might and Wise. (228)
Surah Al-Baqarah
3-And those who no longer expect menstruation among your women - if you doubt, then their period is three months, and [also for] those who have not menstruated. And for those who are pregnant, their term is until they give birth. And whoever fears Allah - He will make for him of his matter ease. (4)
Even she delivers next day of talaq or death of his husband.
the difference is this the first one iddat is for the woman whose husband die and the second is for divorced woman. I have no idea except the iddat of divorced is because divorce is revocable and period is enough to take wife back. Rest i want to know the reason of four month and 10days. No knowledge regarding why they are different from eachother.
another iddat i know from hadith is one period for the one who is divorced by khul.
Prophet (peace and blessings of Allaah be upon him) told the wife of Thaabit ibn Qays, when she** divorced him by khula**’, to wait out the ‘iddah for one menstrual cycle. (Narrated by al-Tirmidhi, 1185; classed as saheeh by al-Albaani in Saheeh al-Tirmidhi, 946)