The Trinitarian solution (according to the ecumenical Chalcedonian Definition) is that starting with Mary's conception (Luke 1:35) the Word (the second person of the Trinity, John 1:1):
- entered creation (more specifically our planet earth) which was made through him (John 1:3)
- entered time (John 1:9) from eternity (John 1:2)
- added on a human nature ("flesh") (John 1:14) while retaining his divine nature (John 1:18)
Thus Jesus the man has BOTH:
- divine nature who is the light of men (John 1:4), whose mission is to enlighten (John 1:5, John 1:9), to rescue and to redeem our fallen human nature (John 1:12)
- human nature who is to become our realistic example of how to love God and to love neighbors, fulfilling the expectation that Adam couldn't do, expectation that the chosen nation Israel couldn't do either, because they kept breaking the covenant.
It's Jesus in his human nature who
- was born as a helpless a baby in Bethlehem
- grew in wisdom and stature (Luke 2:52)
- prayed to the Father in Gethsemane (Luke 22:41-44)
- willingly suffered for our sins and died on the cross
- was resurrected to glory by all 3 Persons of the Trinitarian God, and finally
- exited our universe and our time back to eternity in heaven.
During Jesus's stay on earth (about 33 years), the Trinitarian God (who cohered as Christ's divine nature) was unchanged, existing as before, now, and future in His eternal realm governing and upholding the universe without missing a beat. In other words, Christ's divine nature did not cease being all-knowing and all-powerful, and he could therefore "[uphold] the universe by the word of his power" (Heb 1:3) by being the Word (the second person of the Trinity) as well as the human Jesus at the same time.
For a good explanation on how this "adding human nature" works (explaining the portion of the Chalcedonian definition which says "Two Natures unconfusedly, unchangeably, indivisibly, inseparably"), including how the definition reconciles his growing in wisdom and stature (Luke 2:52) with his omniscience in his divine nature, please watch the 11-minute interview video of Christian philosopher Eleonore Stump on Jesus as God.