The Messenger of Allah ﷺ said, "When the wife of one of you asks his permission to go to the mosque, he should not prevent her."
حدثنا إسحق بن إبراهيم قال أنبأنا سفيان عن الزهري
قال رسول الله ﷺ إذا استأذنت امرأة أحدكم إلى المسجد فلا يمنعها
Bukhari transmitted it in the Book of Marriage, chapter on a wife seeking her husband's permission to go out to the masjid or elsewhere, hadith 5238, and Muslim in the Book of Prayer, chapter on women going out to masjids when it does not lead to temptation, etc., hadith 442, and it is in Sunan al-Kubra, hadith 0785.