The Prophet ﷺ used to say, "O Allah, I seek refuge in You from words that go unheard, deeds that are not raised up, a heart that does not humble itself, and knowledge that brings no benefit."
أن النبي ﷺ كان يقول: اللهم إني أعوذ بك من قول لا يسمع، وعمل لا يرفع، وقلب لا يخشع، وعلم لا ينفع.
Imam Ahmad narrated it (13003) from Bahz and Abu Kamil, who said, Hammad bin Salama narrated to us, from Qatada, from Anas, and he related it. Its chain of transmission is sahih. Ibn Hibban graded it sahih (83), narrating it through the route of Hammad, with the same wording.