The Prophet (ﷺ) remained in Mecca for ten years, during which the Qur'an used to be…

Sahih al-Bukhari Book 66 Hadith 1

Sahih al-Bukhari #4978, 4979

Virtues of the Qur'an 66:1

Narrated `Aisha and Ibn `Abbas:

The Prophet (ﷺ) remained in Mecca for ten years, during which the Qur'an used to be revealed to him; and he stayed in Medina for ten years.

Chapter: How the Divine Revelation used to be revealed and what was the first thing revealed

Grade: Sahih