Sahih Muslim 790
Sahih Muslim · Book 6: The Book of Prayer - Travellers · The command to keep refreshing one’s knowledge of the Qur’an and that it is disliked to say I have forgotten such-and-such a verse, but it is permissible to say I have been caused to forget
Ibn Mas'ud reported Allah's Messenger (ﷺ) as saying:
وَحَدَّثَنِي مُحَمَّدُ بْنُ حَاتِمٍ ، حَدَّثَنَا مُحَمَّدُ بْنُ بَكْرٍ ، أَخْبَرَنَا ابْنُ جُرَيْجٍ ، حَدَّثَنِي عَبْدَةُ، بْنُ أَبِي لُبَابَةَ عَنْ شَقِيقِ بْنِ سَلَمَةَ ، قَالَ سَمِعْتُ ابْنَ مَسْعُودٍ ، يَقُولُ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ " بِئْسَمَا لِلرَّجُلِ أَنْ يَقُولَ نَسِيتُ سُورَةَ كَيْتَ وَكَيْتَ أَوْ نَسِيتُ آيَةَ كَيْتَ وَكَيْتَ بَلْ هُوَ نُسِّيَ " .
Wretched is the man who says: I forgot such and such a sura, or I forget such and such a verse, but he has been made to forget.