With utmost confidence we see that God superintended the preservation of His record through the Apostles what we have today: The New Testament. Even shortly after Paul and other apostles wrote their epistles, the letters were recognized as the word of God: I want you to recall the words spoken in the past by the holy prophets and the command given by our Lord and Savior through your apostles (2Peter 3.2, see also 3.15-16).
Here is a post about lists of the canon. Even if we don’t have a list from the 1st century, only apostolic writers were ever considered authoritative which agrees with Jesus’ statement of the Spirit’s ministry: When the Advocate comes, whom I will send you from the Father—the Spirit of truth who goes out from the Father—he will testify about me, and you also will testify, because you have been with me from the beginning. (John 15.26-7)