Abdullah bin Masud reported,

I heard the Messenger of Allah ﷺ say, "How wretched it is for a man to say, 'I have forgotten such-and-such surah,' or, 'I have forgotten such-and-such verse.' Rather, he was made to forget."

Muslim 1843

Sahih

و حدثني محمد بن حاتم حدثنا محمد بن بكر أخبرنا ابن جريج حدثني عبدة بن أبي لبابة عن شقيق بن سلمة قال سمعت

ابن مسعود يقول

ا سمعت رسول الله ﷺ يقول بئسما للرجل أن يقول نسيت سورة كيت وكيت أو نسيت آية كيت وكيت بل هو نسي

مسلم 1843صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Virtues of the Quran and what relates to it
Chapter
Command to constantly review the Quran and the dislike of saying "I forgot such and such a verse", and the permissibility of saying "I was made to forget it"
Numbering
Darussalam 1843
Muslim 1843