The Trinity is a pretty strange doctrine. It’s hard to see how the Bible supports it. You really have to understand what Christianity was up against at the time. Not only was it splitting off from Judaism, something made totally necessary by the fact that Christians insisted that Jesus was a messiah, but he didn’t fit any of the established prophecies or even the spirit of a Jewish messiah.
But it was also fighting with the established Roman multi-ethnic pagan religion. The way religion worked back then was, if we conquered you, you had to convert to our religion. Our soldiers would go to your temples and, depending on how amenable you were to conversion, either dress them up to look like our temples, or we’d raze them to the ground and erect our own in it’s place.
Your god can be a part of our pantheon, or we’ll just execute everyone who refuses to play ball. This is how Greek and Roman religion got all those gods and demigods. As individual cults with their own gods became principalities of larger societies, gods just multiplied.
Jews never acquiesced to this tactic, it’s what set them apart from everyone else. It earned them the enmity of emperors, who would persecute Jews and try to persuade them to convert. I don’t think they cared all that much about the actual religion that Jews practiced, but rather that peoples that refused to identify with the empire inevitably ended up revolting.
Jews wanted an empire, a state of their own, and the power of a ruler in the Davidian mold. But their existing Davidian line of kings died out 400 years ago. A lot of Jews, and people who weren’t ethnically Jewish but still affiliated with the religion somehow, felt like God left them. The Romans got fed up with it and eventually dealt an absolutely massive blow by razing the glorious Temple of the Mount to the ground and scattering the Jews that they couldn’t catch and slaughter.
It was the perfect environment for a new prophet to emerge, that prophet was Jesus. Holy men abounded in that environment, but Jesus stood above them all through his bearing and deeds, and the way he went willingly to his own crucifixion. It was profoundly un-Jewish, but it made a huge impression on people.
The cult of Jesus spread like wildfire. New scripture was created around Jesus, just as scripture had been made to chronicle Jewish history for a thousand years. This scripture became the New Testament. By the time of the first council of Nicaea, close to two thousand bishops were spreading the gospel of Jesus.
But everyone had different ideas about what the myths meant and where Jesus stood in relationship to God. The doctrine of the Trinity evolved over a thousand years, first with the question of Arianism, which concerned whether Jesus was actually God or not. This question is fundamental to the idea of Christianity, the belief that God became man and walked the Earth to teach people how he wanted them to live.
Later the Christian church split over the question of whether the Holy Spirit, the mechanism for how God interacts with the world, comes from both Jesus and God. The Catholic Church decided that it did, and the Orthodox Church decided that it didn’t.
And that’s where it stands today. It doesn’t seem to make sense when you’re just reading the stories and history of the Bible, but when you apply thought and reason to what the true nature of God is when you consider Jesus to be an incarnation of God, the Trinity is a natural conclusion, otherwise you wind up with the necessity of saying one is more important or better than the other.