Allah's Messenger (ﷺ) said, "None of you should try to pray at sunrise or sunset."

Sahih al-Bukhari Book 9 Hadith 61

Sahih al-Bukhari #585

Times of the Prayers 9:61

Narrated Ibn `Umar:

Allah's Messenger (ﷺ) said, "None of you should try to pray at sunrise or sunset."

Chapter: One should not try to offer As-Salat (the prayers) just before sunset

Grade: Sahih