It was narrated that Ibn 'Umar said:
"The Messenger of Allah (ﷺ)
said:
'Do not lift your gaze to the heavens lest your sight be
snatched away," meaning during prayer.
English reference: Vol. 1, Book 5, Hadith 1043
Arabic reference: Book 5, Hadith 1096
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.