You are exactly right, but that Holy Spirit was talking to members of God’s Pilgrim Church on Earth, Catholics.
2 Peter 1:21 For no prophecy was ever produced by the will of man, but men spoke from God as they were carried along by the Holy Spirit.
Peter made no mention at all of Catholicism in his letters nor did he credit the *church* with bringing the word of God to mankind.
Nor did Paul.
2 Timothy 3:16-17 All Scripture is breathed out by God and profitable for teaching, for reproof, for correction, and for training in righteousness, that the man of God may be complete, equipped for every good work.
Retroactively declaring all Christians as Catholics in an attempt to give credit to the Catholic church for the word of God is not going to convince anyone but Catholics because the rest of the world has not been brainwashed by Catholicism to believe their revisionist history over historic fact.
Nobody owes the Catholic church anything for their claims to have given the world the Bible and preserving it. All the credit goes to God who is more than capable of doing it Himself without being indebted to Catholicism for its *help*.