Both are correct under different conditions.
When the two (or more) words are used as an adjective, they are hyphenated.
Otherwise, not.
Examples:
When the two (or more) words are used as an adjective, they are hyphenated.
Otherwise, not.
Examples:
- โI liked that book because it was well written.โ (no hyphen)
- โThat well-written book was one that I liked.โ (hyphen)