In Islam, death marks the transition from worldly life to the afterlife. The soul departs the body, and a series of events unfold leading to the Day of Judgment.
Immediate After Death
Upon death, the body undergoes Ghusl (ritual purification) and Janazah (funeral prayer) performed by family and the Muslim community. https://www.muslimaid.org/media-centre/blog/what-will-happen-after-death-according-to-islam/ The deceased is then buried, typically in a simple grave. https://www.quora.com/What-will-happen-after-death-in-Muslims
The Barzakh and the Soul
Following burial, the soul enters Barzakh, an intermediate state between death and the Day of Judgment. https://www.bbc.co.uk/bitesize/guides/zdxdqhv/revision/5 Muslims believe the soul remains conscious and experiences a form of existence, awaiting final judgment. https://www.islamic-relief.org.uk/giving/islamic-giving/islamic-inheritance/when-someone-dies-in-islam/ Some interpretations mention a "punishment of the grave" during this period. https://www.reddit.com/r/islam/comments/w4cwoe/what_is_islams_teaching_about_life_after_death/ The soul may experience reward or punishment based on their deeds in life. https://islamqa.info/en/answers/200530/what-happens-after-death
The Day of Judgment
The ultimate destination is determined on the Day of Judgment. God, acting as judge, weighs the individual's good and bad deeds. https://en.wikipedia.org/wiki/Islamic_view_of_death Based on this assessment, the individual's soul will enter either Jahannam (Hell) or Jannah (Heaven). https://zamzam.com/blog/life-after-death-in-islam/
Mourning and Iddah
For the bereaved, the period of Iddah (waiting period) provides time for mourning and reflection after the death of a spouse. https://www.mariecurie.org.uk/talkabout/articles/iddah-was-my-time-to-heal-mourn-and-reflect-after-my-husbands-death/273522