I asked the Messenger of Allah ﷺ, "Messenger of Allah, which deeds are the most excellent?"He answered, "Prayer at its appointed time."I asked, "Then what, Messenger of Allah?"He said, "Kindness to parents."I asked, "Then what, Messenger of Allah?"He said, "Struggling in the path of Allah."Then the Messenger of Allah ﷺ fell silent, and had I asked him for more, he would have told me more.
حدثنا أحمد بن محمد أخبرنا عبد الله بن المبارك عن المسعودي عن الوليد بن العيزار عن أبي عمرو الشيباني
سألت رسول الله ﷺ فقلت يا رسول الله أي الأعمال أفضل قال الصلاة لميقاتها قلت ثم ماذا يا رسول الله قال بر الوالدين قلت ثم ماذا يا رسول الله قال الجهاد في سبيل الله ثم سكت عني رسول الله ﷺ ولو استزدته لزادني
Agreed upon [by Bukhari and Muslim]. Bukhari narrated it in the Book of Manners, Chapter on Kindness and Maintaining Ties, no. 5970, and Muslim, no. 85, from the hadith of Walid bin Ayzar.