It depends on what you mean by church.
The Church, as a whole, does not follow the Catechism though the Church produced the Catechism. It's like saying, What did people speak before the first dictionary?
Catechisms are summaries of Church teaching; they are not definitions of that teaching.
The teaching of the Catechism is drawn from the Sacred Scriptures,
- as expressed in the Bible, and Sacred Tradition,
- as expressed in Magisterium or teaching office of the Church (See CCC 74-100) —
composed of the pope and the bishops in communion with him.
Generally, Magisterial teaching is expressed through one of the 21 Ecumenical Councils of bishops of the Church or through a special decree of the pope, although it cannot be reduced to the written form.
This faith articulated by the Magisterium could be known by lay people and the Church at large through various ways. The Catechism of the Catholic Church is not the first Catechism. These go back to the beginning of the church; for example:
- the Teaching of the Twelve Apostles or Didache, a first century document, could be called a Catechism.
- The Council of Trent produced the Roman Catechism in the 16th century.
- In America, we had the Baltimore Catechism for many years or, one could consult the canons of ecumenical councils, encyclicals, and other relevant documents.
The problem was, a lot of the documents were very old or inaccessible, or needed a context of interpretation that was not accessible to non-theologians. In short, it was hard or at least inconvenient for lay people or even just non-theologians to nail down exactly what the Church officially believed.
In short, the Church has been defining what it believes and documenting it since the first century and has been continuously defining this since then. (Lest I be misunderstood, some aspects of the faith are living and not documented, so let's not limit this teaching to what is written.)
The Catechism was simply a way to summarize 2,000 years of documents and teaching into something readily accessible to the modern mind.