This is explained in Philippians 2:5–9
“Have this attitude in yourselves which was also in Christ Jesus, 6 who, as He already existed in the form of God, did not consider equality with God something to be grasped, 7 but emptied Himself by taking the form of a bond-servant and being born in the likeness of men. 8 And being found in appearance as a man, He humbled Himself by becoming obedient to the point of death: death on a cross. 9 For this reason also God highly exalted Him, and bestowed on Him the name which is above every name…”
The very nature of Him becoming flesh (mortal) means to have limitations. Becoming mortal means He subjected Himself to the limitations of mortality. Thus He was tempted, He was injured, He suffered, He experienced the entirety of human emotions, He felt hunger, He felt sadness, He felt loneliness, He felt the sting of betrayal, in human form. He also felt joy, He felt elation, He looked forward in Hope. All of it, exactly as we do.
The Father did not (in a sense could not) reveal all things to Him because He was mortal. It wasn’t just possible for Him to be limited in knowledge – it was necessary. God’s mind, God’s knowledge, is far beyond anything we can imagine. The Father restricted Jesus ability to know, by making Him mortal.
But what He did know, what He could know, was vastly beyond our abilities. The Bible says He knew the thoughts and intentions of all men. Can you imagine knowing Judas’ betrayal plans yet still having the humility to wash his feet and offer him the sop of the honored guest? Can you imagine knowing the sinful, evil thoughts of all people, yet having compassion and mercy on us anyway?
Yet, even in that, He had taken on the limitations of mortality. How then did He deliberately endure the cross? Certainly, as we are encouraged in all things – by the power of the Holy Spirit at work within him.
Hebrews 12:2 gives us an understanding, so that we may have the same ability:
“for the joy set before Him endured the cross, despising the shame, and has sat down at the right hand of the throne of God.”
So the point is that He looked with hope for what the cross would accomplish and rejoiced in that, despite knowing the suffering He was about to experience. In other words, He considered the souls He would redeem. He considered those who would be restored to fellowship with the Father. He considered the Father’s joy at recovering His lost children from the kingdom of darkness. And that gave Jesus the joy that enabled Him to endure – without knowing all the details.
So, we see that Jesus, our model of conduct, lived by faith.