The poetic device that Shakespeare uses in “Sonnet 18” is that they are in iambic pentameter.
An iambic pentameter is a form of a metrical line in which each line contains five unstressed syllables followed by five stressed syllables. They are usually arranged in an alternating pattern.
“And often is his gold complexion dimm'd;”
The highlighted syllables are stressed syllables and the non-highlighted ones are unstressed.