بسم الله الرحمن الرحيم
What you have quoted it is with the following wordings in the Hadith:
كُنَّا مَعَ النَّبِيِّ صلى الله عليه وسلم وَنَحْنُ فِتْيَانٌ حَزَاوِرَةٌ فَتَعَلَّمْنَا الإِيمَانَ قَبْلَ أَنْ نَتَعَلَّمَ الْقُرْآنَ.
We were with the Prophet (may peace and blessings of Allah be upon him), and we were strong youths, so we learned faith before we learned Qur’an.
It means that we learned the knowledge of faith before we learned the Fiqh of Quran. [Hashia Ibn Majah, p. 76, Ittihad Deoband]
Allah knows Best!
Darul Uloom Deoband
This answer was collected from the official ifta website of Darul Uloom Deoband in India.