There are a lot of different ways to understand the purpose of the church. This is a great one:
“The Church exists to keep alive in people’s heart the memory that God loves them. It exists to tell everyone, even those furthest away: ‘God doesn’t forget you, He cares about you’.” — Pope Francis on Twitter [1]
[1] Pope Francis, Twitter post, November 30, 2019, 6:30 a.m., http://twitter.com/Pontifex.