These verses describe how the people in the crowds reacted to Jesus's teaching in the Sermon on the Mount. (See: [[rc://en/ta/man/jit/writing-endofstory]])
It is clear in 7:29 that they were amazed not just at what Jesus taught but also the way he taught it. Alternate translation: "were amazed by the way he taught"