The adjectival phrase is written as “twelve years old” (no hyphens, with an S), and it comes after the verb “to be.” He is twelve years old, the twins are twelve years old, the wine is twelve years old. “Twelve-year-old” (with hyphens, no S) is an adjective that goes in front of a noun, or that can be used as a noun.