The Prophet ﷺ said, "When the imam says ameen, say ameen as well, for whoever's ameen coincides with the ameen of the angels will have his past sins forgiven."
حدثنا أبو كريب محمد بن العلاء حدثنا زيد بن حباب حدثني مالك بن أنس حدثنا الزهري عن سعيد بن المسيب وأبي سلمة
عن النبي ﷺ قال إذا أمن الإمام فأمنوا فإنه من وافق تأمينه تأمين الملائكة غفر له ما تقدم من ذنبه
Agreed upon [by Bukhari and Muslim]. Bukhari narrated it in the chapter on adhan, section on the imam saying the taameen aloud, hadith no. 780, and Muslim narrated it in the chapter on prayer, section on saying "sami Allahu liman hamidah," "rabbana wa lakal-hamd," and the taameen, hadith no. 410, both from the hadith of Malik through this chain, and it is found in Muwatta, 1/87 (Yahya).