Shakespeare, William. "Sonnet 12." The Norton Anthology of English Literature, edited by Stephen Greenblatt, 10th ed., vol. 1, Norton, 2018, pp. 1139–1140.
Adapt for your specific sonnet, anthology edition, editor, and page numbers. For standalone sonnet collections, cite the collection as the container.