The Messenger of Allah ﷺ said, "Allah, benefit me by what You have taught me, teach me what will benefit me, and increase me in knowledge. Praise be to Allah in every state, and I seek refuge in Allah from the state of the people of the Fire."
حدثنا أبو كريب حدثنا عبد الله بن نمير عن موسى بن عبيدة عن محمد بن ثابت
قال رسول الله ﷺ اللهم انفعني بما علمتني وعلمني ما ينفعني وزدني علما الحمد لله على كل حال وأعوذ بالله من حال أهل النار
Its chain of transmission is daif. Ibn Majah narrated it in the Introduction, chapter on benefiting from knowledge and acting upon it, hadith 251, from Abdullah bin Numayr, through this route. Musa bin Ubayda and Muhammad bin Thabit are both daif. The hadith "O Allah, benefit me with what You have taught me, and teach me what will benefit me" has a corroborating narration in Hakim, 1/510, with a hasan chain of transmission.