The Messenger of Allah ﷺ said, "Whoever forgets a prayer should perform it as soon as he remembers it."
أخبرنا قتيبة قال حدثنا أبو عوانة عن قتادة
قال رسول الله ﷺ من نسي صلاة فليصلها إذا ذكرها
Muslim narrated it in the Book of Mosques, in the chapter on making up a missed prayer and the recommendation of hastening to make it up, hadith 314/684, from Qutayba. Bukhari narrated it in the Book of Prayer Times, in the chapter on one who forgets a prayer should pray it when he remembers, and so on, hadith 597, from the hadith of Qatada with the same wording. It is also in Kubra, hadith 1586.