年纪 and 年龄 both are nouns that mean “age” as in how old someone is, and sometimes can be used interchangeably. Both words are used in more formal settings. Nonetheless, 年纪 and 年龄 do have differences and are often paired with certain words in patterns that are not interchangeable. 年纪 is often used to describe a period of time and the approximate age that goes with it, i.e., young age, old age, etc.; whereas 年纪 usually describes the actual age at which something happens, i.e., enter school, retire, etc.
B2HSK5ASV4567