From Sahih Bukhari (Hadith 3202):
Narrated `Abdullah bin `Abbas:The Prophet (ﷺ) said, "The sun and the moon are two signs amongst the Signs of Allah. They do not eclipse because of someone's death or life. So, if you see them (i.e. eclipse), celebrate the Praises of Allah (i.e. pray)
Reference: Bukhari 3202