There are several different ways in which Chapter Six of John's Gospel sees Jesus as the bread of life.
The day before, Jesus fed five thousand people with just five loafs; and that prompted the people to say Jesus must be the Prophet of whom Moses spoke when he said, "God will send you a Prophet like me, and you must listen to him."
Now, among the Jews there had sprung up an idea that when the Prophet come, he would bring fresh manna down from heaven. It was going on that expectation that had the Jews asking Jesus what sign he would give them.
Jesus, changing the subject, said that what Moses gave them was not true bread. Then, changing the subject, he said that he himself was the bread of life. He was not there referring to Holy Communion. No, he was saying that the words he spoke to us deep in our hearts would be like bread, nourishing the soul.
After that, switching to speaking of his presence in holy Communion, Jesus said he he would give us bread that was actually his flesh.
That was too much for the people to accept, and most of his followers left him. Turning to his Apostles, he asked if they too would leave him. That caused Peter to ask, "To whim might we go? You have the words of everlasting life."