Looking around in the prayer is forbidden
It is narrated from Aisha (may Allah be pleased with her) that I asked the Messenger of Allah ﷺ about looking from side to side during the prayer, so he ﷺ said: هو اختلاس يختلسه الشيطان من صلاة العبد “This is a snatching by Satan, by which Satan snatches from a person.”
Reference: Bukhari: 751, Kitab al-Adhan: Bab al-Iltifat fi al-Salah, Ahmad: 70/6, Abu Dawud: 910, Nasa’i: 8/3, Ibn Khuzaymah: 484