Earlier in the chapter, Jesus fed the 5,000 (John 6:1–13). The next day, the same multitudes continued to follow Him, seeking another meal. Jesus pointed out their short-sightedness: they were only seeking physical bread, but there was something more important: “Food that endures to eternal life, which the Son of Man will give you” (verse 27). At this point, Jesus attempts to turn their perspective away from physical sustenance to their true need, which was spiritual.
This contrast between physical food and spiritual food sets the stage for Jesus’ statement that we must eat His flesh and drink His blood. Jesus explains that it is not physical bread that the world needs, but spiritual bread. Jesus three times identifies Himself as that spiritual bread (John 6:35, 48, 51). And twice He emphasizes faith (a spiritual action) as the key to salvation: “My Father’s will is that everyone who looks to the Son and believes in him shall have eternal life” (verse 40); and “Very truly I tell you, the one who believes has eternal life” (verse 47).
Jesus then compares and contrasts Himself to the manna that Israel had eaten in the time of Moses: “Your ancestors ate the manna in the wilderness, yet they died. But here is the bread that comes down from heaven, which anyone may eat and not die” (John 6:49–50). Like manna, Jesus came down from heaven; and, like manna, Jesus gives life. Unlike manna, the life Jesus gives lasts for eternity (verse 58). In this way, Jesus is greater than Moses (see Hebrews 3:3).
https://www.gotquestions.org/Jesus-eat-flesh-drink-blood.html