I remember my teacher told me when I was a student that I should say :" I am 24 year old" not " I am 24 Years old" .
He was always stressing that the word “year” should come in singular not in plural because here “24 year” is an adjective and adjectives never come in plural.
However, I used to see some written text thereafter showing “years” in plural for the same structure.