In regards to the matter concerning permissibility of women leaving their homes, Allāh says in al-Qurʾān:
وَقَرۡنَ فِي بُيُوتِكُنَّ
And abide in your houses
– Sūrah al-Aḥzāb, ʾĀyah 33
Some ignoramuses may quote this ʾĀyah unrestrictedly & say that women are forbidden from leaving their homes in all affairs; though such is not the case, as evinced by Aḥādīth of our beloved Prophet ﷺ, the Ṣaḥābiyat, & statements of the scholars.
In regards to the 33rd ʾĀyah in Sūrah al-Aḥzāb, Imām ibn Kathīr رحمه الله (d. 774 AH/1373 CE) commented saying: “(This) means stay in your houses and do not come out except for a purpose. One of the purposes mentioned in the Sharīʿah is offering Ṣalāh in the Masjid so long as the conditions are fulfilled.” 
Among the Aḥādīth of The Prophet ﷺ which indicates the permissibilty of women leaving their homes are such as:
Do not prevent the female servants of Allāh from visiting the Masājid of Allāh.Ṣaḥīḥ al-Bukhārī #900, Ṣaḥīḥ Muslim #442, Sunan Abū Dāwūd #565, Sunan ibn Mājah #16, al-Muwaṭṭaʾ #469, Musnad Aḥmad 2/438, Ṣaḥīḥ ibn Khuzaymah #1679, Ṣaḥīḥ ibn Ḥibbān #327 | Muttafaqun Alayh, Ṣaḥīḥ to both Imām al-Bukhārī and Imām Muslim
The best rows for men are the first rows, and the worst ones the last ones, and the best rows for women are the last ones and the worst ones for them are the first ones.Ṣaḥīḥ Muslim #440, Sunan an-Nasā’ī #820, Jāmiʿ at-Tirmidhī #224, Bulūgh al-Marām #416, Sunan al-Kubrā #894 | Ṣaḥīḥ to Imām Muslim
It is not permissible for a woman who believes in Allāh and the Last Day to make a journey of one day and night unless she is accompanied by a Maḥram.Ṣaḥīḥ al-Bukhārī #1088, Riyāḍ aṣ-Ṣāliḥīn #989 | Ṣaḥīḥ to Imām al-Bukhārī
A man said to The Prophet ﷺ:
O Messenger of Allāh! I have been enrolled for such and such expedition, and my wife left for Ḥajj. (The Prophet ﷺ replied): Go and perform Ḥajj with your wife.Ṣaḥīḥ al-Bukhārī #3061, Ṣaḥīḥ Muslim #1341, Riyāḍ aṣ-Ṣāliḥīn #990 | Muttafaqun Alayh, Ṣaḥīḥ to both Imām al-Bukhārī and Imām Muslim
ʿĀʾisha رضي الله عنها narrated:
A slave girl came to Allāh’s Messenger ﷺ and embraced Islām. She had a tent or a small room with a low roof in the Masjid.Ṣaḥīḥ al-Bukhārī 1/430
Shaykh Muḥammad ibn Ṣāliḥ al-‘Uthaymīn رحمه الله (d. 1421 AH/2001 CE) was asked, “Is it permissible for a woman to attend religious gatherings and lessons on Fiqh in Masājid?“, thereupon he replied: “Yes, a woman is allowed to attend religious gatherings. It is the same whether they are gatherings for Fiqh, ʾĪmān, or Tawḥīd. However, this is on the condition that she should not apply perfume or adornments, and should be far away from the men and mixing with them. This is because The Messenger of Allāh ﷺ said: ‘Best of the rows for women are the last ones and the worst are the front rows.’ This is because the front rows are closer to the men than the last ones, thus making the last ones better than the front ones.” 
Shaykh ʿAbdullāh ibn Jibrīn رحمه الله (d. 1430 AH/2009 CE) was asked, “Is it permissible for a woman to go out to the ʿĪd Prayer?”, he responded: “Yes, it is sanctioned for them to go out to the two ʿĪd Prayers and this is stressed for women. It is recorded in the Ṣaḥīḥayn from Umm ʿAṭṭīyah who said: ‘We were ordered to go out on the Day of ʿĪd, even including the young virgin in her house and the menstruating woman. They would make Takbīr with the others and supplicate with them and hope for the blessings of that day.’ Another narration states that The Messenger of Allāh ﷺ used to tell the virgins, young women secluded in their houses, and menstruating women to go to the ʿĪd Prayer. The menstruating women would remain away from the place of prayer and would join in the good deeds and supplications of the Muslims. The woman though, must go out without perfume and without displaying her beauty. Furthermore, she must remain away from mixing with the men.” 
A question was posed to The Permanent Committee for Research and Verdicts, “What is the ruling concerning a woman going out to the market without her husband’s permission?“, in which they answered: “If a woman wants to go out of her husband’s house, she must inform him where she intends to go. Then if the husband allows her, she can then go out as long as there is no evil resulting from this.” 
In summary, it is permissible for a woman to leave her home if it is of necessity or that which is beneficial; such as going to the Masjid, visiting family & friends, acquiring resources from the markets, & other than that as long as if it does not result in overstepping any boundaries of Islām.
Therefore, one who believes that women are prohibited from leaving their home unrestrictedly in all matters is upon a false belief & is in need of dire rectification. And Allāh knows best.
All praise is due to Allāh, may His peace & blessings be upon our final Prophet Muḥammad, his family, his companions, & all those who follow him in guidance.
 Tafsīr ibn Kathīr (تفسير ابن كثير) by Imām ibn Kathīr | Sūrah 33, ʾĀyah 33
 al-Fatāwā (الفتاوى) compiled by ibn Maqbūl Ḥusayn | Page 278
 Fatāwā al-Mar’ah (فتاوى المرأة) compiled by Muḥammad ibn ʿAbd al-ʿAzīz al-Musnad | Page 125
 al-Fatāwā (الفتاوى) compiled by ibn Maqbūl Ḥusayn | Page 260
Ṣafīullāh Labīb ibn Salīm ʿAbd al-Malik
18th of Muḥarram 1444 – 16th of August 2022