The trinity can be a confusing concept and it's one of the ones where there's actually some utility in looking outside Christianity into other spiritual philosophic texts to see why the trinity concept shows up in multiple places…
Hindus have a trinitarian godhead (see: Bhagavad Gita) as do the Jewish Kabbalists (see: The Zohar) and a lot of gnostic writings and Hermetic systems really spend time unpacking the trinity idea.
It's something like this…
God Most High, the unchangeable pre-existent pre-eminent One, must contain the Knower, the Known and the Knowledge itself.
The Kabbalists describe this as The Crown (Keter) which is God the Father, then Wisdom (Chokmah) which is The Son, then Understanding (Binah) which is the Holy Spirit.
You could think of these roughly as being The Sum Total (God as One not doing anything), his Active principle (Him doing stuff) and his Passive principle (the part on which He acts).
This is *very* knotty stuff to get around and frankly most Christians don't understand it even a little bit because it's very high conceptual philosophy… so the short version is don't worry about it too much.
Here's what you need to know…
God the Father is the pre-existent creator of All things… the self-aware, self-generating, All-knowing, etc. etc.
God the Son as the manifest Christ on Earth is a fun one that requires some explanation.
It would take pages to explain why there must necessarily be Darkness along with Light and Evil along with Goodness… but the short version version is that it's logically impossible to create a dynamic universe without it because without diminishing God's Light there could be no separation from his Unity.
This continues further into the conceptual space of choice… there is NO FREE WILL without the capacity for Evil… it is genuinely as simple as that. If we couldn't choose to be shitcunts then we don't have Free Will and that's that.
OK so Evil exists… how then does God justify his creation to his creatures?
There's an idea in medical science that you can't just test wild unapproved medicines on people but you can self-inject. i.e. it's alright to do it to yourself… that's ethically sound.
So God justifies his creation by manifesting himself in the form of his Son… who necessarily must be perfect in his humanity as well as perfect in his divinity, because otherwise it's a shit example.
What I mean by that is that Jesus/Jesus was completely human… if he wasn't then he would be too far abstracted from us to be a perfect example or sacrifice.
God manifests as the embodiment of his own Wisdom and imparts said Wisdom to his creatures. He also gives us the example of self-sacrifice for the good of the creation.
Basically, we're justified through Christ's sacrifice because he came down and suffered as extremely as possible and very visibly. This is by design because if he'd "gotten off lightly" then those who suffered more would not be justified in their suffering.
You have to consider too that this example needed to be something that could be understood by ALL people regardless of their culture or intelligence… that's why it needed to be acted out. Actions speak louder than Words… and even though Christ/Jesus is the Word… it's his Actions that were our salvation.
So when unpacking this stuff there's a lot of really complicated reasons for it all happening, which would necessarily follow from the fact that God has perfect supreme intelligence… but there needs to be an "interpretation for everybody" so it was done in such a way that even the dumb-dumbs would be able to understand it.
There's a stack more to it than this but it's like… several books worth of stuff.
TL;DR - God manifested Himself as his Son… who had Free Will and could choose temptation… who struggled against the flesh in the same way we did… who went through all the same shit we did… he was completely human and not abstracted from us… he did this to demonstrate his Wisdom and justify the Evil and suffering in this world through basically always doing the right thing. He suffered in the extreme to prove that God is not indifferent to the extremes of suffering that this world is capable of producing.
God is with us. He is with you now. He sees through your eyes and he shares in your trials and tribulations.