Translation issue, original hebrew uses Alahym, that is applied to powers of authority. Sometimes it refrences the three powers that worked as one to create the heavens and earth.
There was a being that came down, sometimes he was called a pillar of smoke or cloud etc, but he had a bodily apperance. Helped Moses and the children of Jacob out when the Egyptains chased them, they called him Yah (Was not a short form of YHWH). And was called the Word which would speak what he was told to speak to man. A different being from YHWH.
So when he was going to be stoned for saying "I AM". He was telling the truth, he was saying that he was YAH, but even most of the hebrews didn't know that YAH and YHWH were not the same person.
I'm not sure who taught the trinity, but the Hebrew believers in the Mashiyak didn't teach it from the evidence I've read of first century hymns and discourses. Some gentiles such as Justin Martyr understood them to be two seperate entities.
I know there was a schism between the gentile and hebrew church, so as the hebrew founders left the scene, the gentile dominated gatherings (bodies) most likely started doing their own thing and adding their own twists. Then the council of Nicea just tweaked all of that confusion into a "canon doctrine" for the state.