The doctrine of the Trinity was taught by christ who tells his apostles to baptize people in the name of the father and the son and the holy spirit.
The trinity isn’t a modern concept. We see it right from Genesis.
In the 4th century the debate was how the Trinity was ordered
What Christ taught was a method and means of baptism. It matches up with this:
Act_2:38 Then Peter said to them, "Repent, and let every one of you be baptized in the name of Jesus Christ for the remission of sins; and you shall receive the gift of the Holy Spirit.
It's not a trinitarian formula, but an explanation of how we need to turn to God through Christ to gain the gift of the holy spirit.