Whoever says: “There is none worthy of worship but Allah alone, Who has no partner, His is the dominion and His is the praise, and he is Able to do all things,” one hundred times, it will be a protection for him from the Devil throughout the day.’ Also with those that are said before sleeping and upon waking up, those for entering and leaving the house, including those for entering and leaving the mosque, and by many other authentic invocations taught to us by the Prophet (ﷺ) such as the reading of ‘Ayatul-Kursi, (Al-Baqarah 2:255), and the last two ‘Ayat of Surat Al-Baqarah before going to sleep.
The Devil is also driven out by the invocations for morning and evening. “Do not turn your homes into graveyards, surely the Devil flees from the house in which Surat Al-Baqarah is read,” Muslim 1/539.
I caught him and said, “I will take you to Allah’s Messenger (ﷺ)!” Then Abu Huraira described the whole narration and said: That person said (to me), “(Please don’t take me to Allah’s Messenger (ﷺ) and I will tell you a few words by which Allah will benefit you.) When you go to your bed, recite Ayat-al-Kursi, (2.255) for then there will be a guard from Allah who will protect you all night long, and Satan will not be able to come near you till dawn.” (When the Prophet (ﷺ) heard the story) he said (to me), “He (who came to you at night) told you the truth although he is a liar and it was Satan. Then somebody came to me and started stealing from the foodstuff.
Ayatul Kursi comes in the Madani Surah and the 2 nd Surah of the Quran, Surah Al Baqarah.