Where did the church get the information that they wrote in the New Testament?
Some of the authors were direct witnesses of Christ's works and words, and others got is from the Holy Tradition, that is, from Christ indirectly. Generally, the Holy Tradition preceded the Holy Scripture and wholly contains it.