An-Noor • BN-TAFSEER-IBN-E-KASEER
﴿ يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ لَا تَدْخُلُوا۟ بُيُوتًا غَيْرَ بُيُوتِكُمْ حَتَّىٰ تَسْتَأْنِسُوا۟ وَتُسَلِّمُوا۟ عَلَىٰٓ أَهْلِهَا ۚ ذَٰلِكُمْ خَيْرٌۭ لَّكُمْ لَعَلَّكُمْ تَذَكَّرُونَ ﴾
“O YOU who have attained to faith! Do not enter houses other than your own unless you have obtained permission and greeted their inmates. This is [enjoined upon you] for your own good, so that you might bear [your mutual rights] in mind.”
Please check ayah 24:29 for complete tafsir.