Caring for children does not interrupt the Sunnah. The Prophet ﷺ prayed while carrying his granddaughter Umāmah: when he prostrated he set her down, and when he stood he carried her. (al-Bukhārī & Muslim). It teaches mercy and that children belong in the masjid.

العربية: عن أبي قتادة رضي الله عنه أنّ رسول الله ﷺ «كان يصلّي وهو حاملٌ أُمامة بنت زينب… فإذا سجد وضعها، وإذا قام حملها». (البخاري ومسلم).

Bring your children to the masjid — and be gentle with them, as the Prophet ﷺ was.