Ibn ‘Umar reported the Messenger of Allah ﷺ as saying; Do not prevent your women from visiting the mosque; but their houses are better for them (for praying).
قَالَ رَسُولُ اللَّهِ ﷺ لاَ تَمْنَعُوا نِسَاءَكُمُ الْمَسَاجِدَ وَبُيُوتُهُنَّ خَيْرٌ لَهُنَّ