Seek permission up to three times; if there is no answer, leave. The Prophet ﷺ said: “Seeking permission is three times; if you are granted leave, (enter); otherwise go back.” (al-Bukhārī & Muslim). Do not peer inside — permission was legislated because of the gaze. (al-Bukhārī).

العربية: عن أبي سعيد الخدري رضي الله عنه أنّ النبيّ ﷺ قال: «إذا استأذن أحدكم ثلاثًا فلم يُؤذَن له فليرجع». (البخاري ومسلم).

Knock or ring no more than three times, don't peer inside, and leave graciously if there is no answer.