Himalaya: Listen. Learn. Grow.
Regarding the timing and contextual background of the supposed revelation (asbāb al-nuzūl), it is considered an earlier "Meccan surah", which means it is believed to have been revealed in Mecca, instead of later in Medina. This is due to the introduction concerning the persecution of the Muslims. The early Muslims were persecuted in Mecca, where Muhammed was not a head of state and not persecuted in Medina, where he was a head of state and had some protection.
The surah states that Nuh, Ibrahim, Lut, Shuaib, Hud, Saleh, Musa and Muhammad all were prophets of God. All of them endured hardships. For example, Noah was ridiculed often and Abraham was thrown into the fire. But God destroyed their people who transgressed. As it says in verse 40