As early as the second century the Church had to respond to groups of people who claimed to be Christians, but believed different and contrary things to what the Apostles had taught. The Church responded to these groups, called heretics, by developing a list of approved books, a creed, and establishing apostolic succession. Before I dive into how these things were made, it is important first to understand who the Church was arguing with and who these heretics were.
The most important heretical groups opposed to the early Church were Gnostics and Mariconites. Since I do not have a lot of space, I am going to quickly and briefly describe these groups. Gnostics believed that a Supreme Being made everything spiritual; however a spiritual being that was created rebelled and created a material world. Since everything was originally spiritual there was in everyone a divine spark, which could be woken up, by some secret knowledge. They believed Jesus came to earth to reveal that secret knowledge to a select group of people, thus they believed their books and group had the secret knowledge and were the only people who would be saved from the evil material world. The Mariconites had a strong dislike of Judaism and flat out rejected the Hebrew Scriptures as Scripture. They believed that the God of the Hebrew Scriptures had usurped authority and power from a Supreme God and created the world and played favorites with the Israelites. Jesus was from this Supreme God and was here to save people from the vindictive evil God of the Hebrew Scriptures; but Jesus was not part of the material world he just appeared on earth as a full grown man. Thus, Maricon made his own Bible/New Testament, which contained an edited version of Luke’s Gospel (with all references to the Hebrew Scriptures removed) and several of Paul’s letters.
So the Church got to work fighting these heresies by developing a list of approved books for a New Testament. There was no council or special meeting the list developed slowly over time. There was no debate among orthodox bishops/churches that the Hebrew Scriptures should be part of the canon. This was to show that God had been at work since the beginning to send the Messiah to put things to right. The Gospels of Mark, Matthew, and Luke were also among the first to be approved, John took a little longer. Soon after the Gospels were approved Acts and Paul’s letters were approved next. Many of the General Letters and Revelation took a little longer to approve.
The Church also came together to make a statement of faith, which the true Church could recite without objection. This statement of faith is what we today call the “Apostles’ Creed.” This was not made by the actual Apostles but it was composed by Church leaders in Rome around the year 150. It was a “symbol of faith,” usually used in the sacrament of baptism. When the Church would ask the candidate, questions about the Father, the Son, and the Holy Spirit using the form of the Apostles Creed we have today. The point was that any Gnostic or Marconite would not be able to agree to the statements in the Creed.
Lastly the Church developed the idea of Apostolic Succession, due to the claims of the Gnostics who, believed they had secret knowledge from the Apostles. Since many of the Bishops at the time could trace their teachers back to the Apostles themselves or the Apostles disciples, they could confirm that there was not secret teaching. Jesus did not give some secret teaching to the Apostles, because the Apostles had not passed on this teaching to their disciples.
In these three ways the second century Church protected the faith entrusted to them and fought against the heretics, which in turn continued to protect the church from some heretical movements later in the history of the Church.