The trinity is an interesting concept, one I agree we likely will never fully understand in this life, but it is the concept the bible clearly teaches from start to finish.
Genesis 1:1
In the beginning, God (Elohim, which is God plural) created the heavens and the earth. 2 The earth was without form and void, and darkness was over the face of the deep. And the Spirit of God (Tradition points to this being the Holy Spirit) was hovering over the face of the waters.
Deuteronomy 6:4
Hear, O Israel: The LORD our God
is one LORD
Shema Israel YHVH
Eloheinu YHVH echad
-- Note the Eloheinu, which is "our God (plural)", so this is in truth "Hear, O Israel: Yahweh our God (plural) is one Yahweh (God).
John 1:1
In the beginning was the Word, and the
Word was with God, and
the Word was God.
Who was the Word? If we follow down to verse 14 and following we get:
14 And
the Word became flesh and dwelt among us, and we have seen his glory, glory as of the only Son[
d] from the Father, full of grace andtruth. 15 (John bore witness about him, and cried out, “This was he of whom I said, ‘He who comes after me ranks before me, because he was before me.’”) 16 For from his fullness we have all received, grace upon grace.[
e] 17 For the law was given through Moses; grace and truth came through Jesus Christ. 18 No one has ever seen God; the only God,[
f] who is at the Father's side,[
g] he has made him known.
So not only was Jesus with God in the beginning He was God, and tracking back to Deuteronomy we know that God is one, but plural so there is no contradiction between the picture of God in the Old and New Testaments.
There are also passages that talk about the Holy Spirit which make it clear that this just isn't the essence of God but another separate personage as part of our one, plural God.
John 14:26
But the Helper,
the Holy Spirit, whom the Father will send in my name,
he will teach you all things and bring to your remembrance all that I have said to you.
There are plenty more passages that we could go over, but these help show that there is a clear teaching of one plural God with three personages contained within. Tertullian, a Latin theologian who wrote in the early third century, was the first to use the word "
trinitas" (translated trinity "person" and "substance" to explain that the Father, Son and Holy Spirit are "one in essence – not one in Person."