The Occasion of Revelation of Surah An-Nasr, the Last Surah Revealed to the Prophet Muhammad (PBUH)
Surah An-Nasr is the 110th chapter of the Quran, consisting of three verses, and it's the last surah revealed to Prophet Muhammad (peace be upon him). Even though it was revealed in Mecca, it's classified as Medinan because it came down after the Hijrah.
The occasion of revelation for this surah includes two things: a sign that the Prophet's passing was near and tidings of victory for the Muslims. Ibn Abbas interpreted that this surah indicated the Prophet's time was approaching, which made Fatimah cry, but she was comforted that she would follow soon after. Besides that, this surah also brought news of Allah's help and victories like the conquest of Mecca.
Surah An-Nasr commands us to glorify Allah, praise Him, and seek forgiveness after victory, just as the Prophet practiced. There's disagreement about when it was revealed: some say it was in the year 10 AH after the conquest of Mecca, and others say it was earlier as a promise of victory.
https://mozaik.inilah.com/dakw