The full title of Johnson's poem is—wait for it—"The Vanity of Human Wishes: The Tenth Satire of Juvenal Imitated." That's quite a title, and it's telling us several things. First of all, the first half of the title—"The Vanity of Human Wishes"—suggests the pessimistic outlook of the poem. These words are telling us not to even try to have hopes, desires and wishes. They ain't gonna come true. Or if they do, they will crumble into dust in no time. Sheesh, talk about pessimism.
The second part of the title—"The Tenth Satire of Juvenal Imitated"—is also important, because it's setting up a relationship between Johnson's poem and a Latin poem. In other words, the title is telling us to read this poem in relation to Juvenal's Tenth Satire.
The title also gives away the poem's form. If the poem is an imitation of Juvenal's "Tenth Satire," then it's meant to be read as a satire. Check out "Form and Meter" for more on that.