Yes. The Prophet (ﷺ) said, "When one of you enters the mosque, let him not sit down until he has prayed two rak'ahs," so it is a confirmed sunnah to pray two rak'ahs of tahiyyat al-masjid before sitting. This applies whenever you enter, even if you intend only to sit briefly; if you arrive and the obligatory or a regular sunnah prayer is due, that prayer suffices in place of it. Some scholars excuse it when the imam is already giving the khutbah on Friday — but the sounder view, and the Prophet's instruction to a man who entered during his Friday sermon, is that one still prays two brief rak'ahs.
Evidence — the daleel
Sahih al-Bukhari 444 ṢaḥīḥSahih Muslim 714 ṢaḥīḥSahih al-Bukhari 931 Ṣaḥīḥ
On deen2u
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.