The Messenger of Allah ﷺ used to say, "Allah, benefit me by what You have taught me, teach me what will benefit me, and increase me in knowledge. Praise belongs to Allah in every state."
حدثنا أبو بكر بن أبي شيبة حدثنا عبد الله بن نمير عن موسى بن عبيدة عن محمد بن ثابت
كان رسول الله ﷺ يقول اللهم انفعني بما علمتني وعلمني ما ينفعني وزدني علما والحمد لله على كل حال
Grading, its chain is daif. Tirmidhi narrated it in the Book of Supplications, the chapter "The Solitary Ones Who Remember Allah Have Gone Ahead... etc.", hadith no. 3599, from the hadith of Ibn Numayr, with this wording, and he mentioned some remarks. Musa bin Ubayda is daif and his teacher is unknown (Taqrib). Part of the hadith has corroborating narrations in Hakim, 1/510.