The Prophet ﷺ said: When a man goes into his house, he should say: "O Allah! I ask Thee for good both when entering and when going out; in the name of Allah we have entered, and in the name of Allah we have gone out, and in Allah our Lord do we trust." He should then greet his family. (Using translation from Abū Dāʾūd 5096)
كَانَ رَسُولُ اللهِ ﷺ يَقُولُ إِذَا وَلَجَ الرَّجُلُ بَيْتَهُ فَلْيَقُلْ اللهُمَّ إِنِّي أَسْأَلُكَ خَيْرَ الْمَوْلِجِ وَخَيْرَ الْمَخْرَجِ بِاسْمِ اللهِ وَلَجْنَا وَباسْمِ اللهِ خَرَجْنَا وَعَلَى اللهِ رَبِّنَا تَوَكَّلْنَا ثُمَّ يُسَلِّمُ عَلَى نَفْسِهِ