(Sayidina) Abu Hurairah (May Allah be pleased with him) narrated that, the Messenger of Allah ﷺ said, ‘When Ramadan arrives, the gates of Jannah are opened. The gates of Hell are locked. And the Shayateen are locked away.’ (Sahih al-Bukhari, 3327).
The above Hadith in Sahih al-Bukhari mentions that the Shayateen (devils) are locked away in Ramadan, this goes beyond the Shaytaan himself being locked away and potentially includes all Shayateen (devils). However, the Hadith has been interpreted in different ways. Imam al-Nawawi quotes Imam Qadi Iyad in his commentary of Sahih Muslim saying the Hadith may be literal or metaphorical.
(Imam) Qadi Iyaad, May Allah Most High have mercy upon him said, it is possible that it is literal, understood according to its apparent meaning. Therefore, the doors of Paradise are indeed opened. The doors of Hell are indeed locked. And the Shayateen (devils) are indeed shackled, this all signifying the entry of the month, and venerating its sanctity. The Shackling of Shayateen (devils) is in order to stop them harming the believers and deceiving them. He said, it is (also) possible that it is figurative (not literal) and alludes to an abundance of reward and forgiveness. And the deception and harm of the Shayateen (devils) decreases, so it is as if they are shackled. Them being shackled is relevant to some matters and not others, and to some people and not others. (Imam al-Nawawi, Sharh Sahih Muslim).
In the above Nass (text) we see that there is a difference of opinion in understanding the Hadith. According to one interpretation we can say Shaytaan is locked away in Ramadaan. However, another interpretation holds that the Hadith is not literal and therefore it is not correct to say the Shaytaan is physically locked away in Ramadan. Rather the Hadith is a metaphor for the restricted ability of the Shaytaan to deceive people.
Such difference of opinion regarding religious matters and the interpretation of Quran and Hadith has been present since the time of the Sahabah, and it is to be respected. Unfortunately many people do not understand this, due to a lack of knowledge, and thus end up confused or astray. Some people are so far astray that they do not recognise difference of opinion in Islam. This results in Fitnah and sectarianism. See the link below for more information on this issue.
And Allah Most High Knows Best.
-Answered by Shaykh Noorud-deen Rashid (04.04.2022)