The Messenger of Allah ﷺ would pray Dhuhr at the height of midday, and Asr while the sun was still bright and clear, and Maghrib when the sun had set, and Isha sometimes early and sometimes late. When he saw that the people had gathered, he would pray it early, and when he saw them coming slowly, he would delay it.
أخبرنا عمرو بن علي ومحمد بن بشار قالا حدثنا محمد قال حدثنا شعبة عن سعد بن إبراهيم عن محمد بن عمرو بن حسن قال قدم الحجاج فسألنا
كان رسول الله ﷺ يصلي الظهر بالهاجرة والعصر والشمس بيضاء نقية والمغرب إذا وجبت الشمس والعشاء أحيانا كان إذا رآهم قد اجتمعوا عجل وإذا رآهم قد أبطئوا أخر
Bukhari transmitted it in the Book of the Times of Prayer, chapter on the time of Maghrib prayer, hadith no. 560, and Muslim also transmitted it, hadith no. 233/646, from Muhammad bin al-Masajid, chapter on the recommendation of praying Fajr early at the beginning of its time, reported by Bashar.