The Messenger of Allah ﷺ said: "The sun and moon do not become eclipsed for death or birth of anyone, rather they are two of the signs of Allah (SWT) the Most High, so when you see that then pray." (Using translation from Nasāʾī 1461)
قَالَ رَسُولُ اللهِ ﷺ إِنَّ الشَّمْسَ وَالْقَمَرَ لَا يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ قَالَ يَزِيدُ وَلَا لِحَيَاتِهِ وَلَكِنَّهُمَا آيَتَانِ مِنْ آيَاتِ اللهِ تَعَالَى فَإِذَا رَأَيْتُمُوهُمَا فَصَلُّوا