Jesus wanted this secret of who he was to be kept a secret and he keeps a low profile with regard to his messianic credentials to dampen popular political messianic aspirations, for those "with eyes to see". He warned the disciples that they should not mention this to anyone.
Having predicted his death, Jesus then speaks about cross-bearing discipleship. Disciples must be ready to face martyrdom. The suffering messiah means also a suffering messianic community. In its original context to 'take up his cross' meant only one thing, to die with Jesus in Jerusalem. Jesus' call is a call for commitment to Christ not just to the disciples, but to "the crowd", an embarrassment.
And he proceeded to teach them
A suffering messiah is not easy for the disciples to come to grips with. He will be rejected, killed and after three days (like Jonah in the big fish) he will rise. He said all this quite openly.
Peter told Jesus off for talking of such things and Jesus rebuked Peter. Out of my sight! Get back with the disciples. Aligning Peter with Satan is extremely harsh. Your thoughts are not God's thoughts, but man's. Then he called the crowd to him. Jesus is calling all to discipleship
If anyone really does want to follow behind me he must deny himself and take up his cross. The image would conjure up cross-bearing criminals, who is shamed in the presence of neighbours and friends. Whoever wishes to save his life and follow will save his life. Life here meaning soul, psyche as in Jung.
And whoever doesn’t will lose it. What does anyone gain by winning the whole world at the cost of his life? Do we want to be found on the wrong side in the day of judgment?