The poem you're referring to is "Ozymandias" by Percy Bysshe Shelley. In the poem, the speaker encounters a traveler who tells him about a ruined statue of Ozymandias (the Greek name for Ramses II), a once powerful and proud ruler. The traveler describes the inscription on the pedestal of the statue, which boasts of Ozymandias's greatness and warns others to "Look on my works, ye Mighty, and despair!"
Based on the traveler's story, the effect on the speaker can be inferred as a mixture of awe, contemplation, and a realization of the transient nature of human power and glory. The description of the crumbling statue and the ironic contrast between the boastful inscription and the desolate surroundings convey a sense of the inevitable decay and insignificance of even the most powerful rulers and their empires.
The speaker, upon hearing the traveler's story, is likely to feel a profound sense of humility and a questioning of the nature of human achievement and legacy. The story serves as a reminder that no matter how great a person's power or influence may be, it is ultimately ephemeral, subject to the passage of time and the forces of nature. This realization may lead the speaker to reflect upon the fleeting nature of human existence and the futility of pursuing grandiose ambitions or seeking immortality through material accomplishments.