“I am telling you before it comes to pass, so that when it does occur, you may believe that I am He.” John 13:19
In other words, Jesus is saying, “If you are struggling to believe that I am the promised Messiah, that I am the one who was in the beginning with God and was God (John 1:1), that I am the divine Son of God, who can forgive all your sins and give you eternal life and guide you on the path to heaven, then I want to help you believe. And one of the ways I am going to help you have well-grounded faith (you see it here in John 13:19!) is by telling you what is going to happen to me before it happens, so that when it happens, you will have good reason to believe in me.” (See the same structure of thought in John 14:29 and 16:4.)
Now there’s the principle. One way that God helps us believe in Jesus – foreknowing things that are going to happen to Jesus and foretelling things that are going to happen to Jesus – is for the purpose of awakening faith in Jesus for who he really is as the divine Son of God who can forgive you and take care of you forever.