Messenger of Allah ﷺ said, "If anyone of you enters a mosque, he should pray two rakʿat before sitting." (Using translation from Bukhārī 444)
أَنَّ رَسُولَ اللهِ ﷺ قَالَ «إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيَرْكَعْ رَكْعَتَيْنِ قَبْلَ أَنْ يَجْلِسَ فِيهِ»