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). (Using translation from Abū Dāʾūd 567)
قَالَ رَسُولُ اللَّهِ ﷺ «لَا تَمْنَعُوا نِسَاءَكُمُ الْمَسَاجِدَ وَبُيُوتُهُنَّ خَيْرٌ لَهُنَّ»