However, you don’t need a hyphen to join the word very or an adverb ending in -ly to another word (very pretty flowers, oddly dressed man).
When an age or a period of time is used as an adjective before a noun, use two hyphens (my two-year-old son), but leave the hyphens out if the noun comes first (he is two years old). Both cardinal and ordinal numbers may be part of a compound word (one-time pass, first-year student).
Incorrect Clara finished a 400 page book last week.
Correct Clara finished a 400-page book last week.
Incorrect Jake served on a nuclear powered submarine.
Correct Jake served on a nuclear-powered submarine.
Incorrect My ten year old brother loves dinosaurs.
Correct My ten-year-old brother loves dinosaurs.