On hearing his words, some of the people said, “Surely this man is the Prophet.”

“the Prophet” was the prophet foretold through Moses in Deut 18:15. Others had previously thought Him to be the Prophet in John 6:14 because of the miracles He had done. Here the reason for thinking Him to be the Prophet is more logical; it is based upon the words He speaks. The distinguishing characteristic of a prophet is not the miracles he may do; it is the prophetic utterances he makes.

Deut 18:15  The LORD your God will raise up for you a prophet like me from among your own brothers. You must listen to him.

John 6:14  After the people saw the miraculous sign that Jesus did, they began to say, “Surely this is the Prophet who is to come into the world.”

Thought at that time was divided between the Prophet also being the Messiah and him just being a forerunner of the Messiah.