What Douglas Moo writes concerning Peter’s declaration that Jesus is God (2 Pet 1:1) seems to be the standard view:
While it would be a gross anachronism to attribute to the apostle at this point a fully worked-out Trinitarian understanding of God, what he says here, along with other similar verses in the New Testament, provides the building blocks for the later elaboration of that central Christian doctrine.
Essentially the view is that later believers in the church developed the understanding of the Trinity by synthesizing all of the related verses of Scripture.
But what this seems to suggest is that our understanding of the Trinity is superior to the apostles ‘ understanding. And yet, our understanding derives from what they taught.
Maybe you could say it this way: Peter understood a slice of the pie but in the course of the next hundreds of years the church put all of the slices together to come with our doctrine.
But if Peter only knew “a slice,” how do I know that he got that “slice” right? (I’m going to deny here that he wrote truth that he didn’t intend or understand.)
Is it not preferable to believe that Peter (and the other apostolic writers of Scripture) had a full and firm grasp of the doctrine of the Trinity and it was on that basis that they could confidently make statements such as “our God and Saviour Jesus Christ”?
It’s true that later believers in the church were compelled to come up with a systematic formulation of these truths because of false teachers. But that does not seem to entail that they were the first ones to understand them. Their belief was that they were simply holding forth the apostolic teaching.