Ironically, Shakespeare both glorifies and immortalizes the "young man" in "Sonnet 18" through the poetic verse itself. This echos the theme "Sonnet 18" which is eternal beauty through verse. This is known as possibly "the" best of Shakespeare's sonnets beginning with the immortal line, "Shall I compare thee to a summer's day?" It is one of the many sonnets written to the elusive "young man," who everyone is always wondering about.
In regards to exactly "how" Shakespeare goes about glorifying and immortalizing, that answer is closely related to theme. At the beginning of the poem, the young man is said to be "more lovely and more temperate" than a day in the season of summer. The speaker then immediately gives many examples of negative summer day issues such as wind, longevity, and heat. By the end of the poem, it is clear that the reason why "thy eternal summer shall not fade" is precisely because Shakespeare has written this poem. Published poetic verse truly does lend immortality to the subject it's written about. Therefore, the theme of "Sonnet 18" is summed up the best in the last two lines:
So long as men can breathe, or eyes can see, / So long lives this, and this gives life to thee.