The examples you give are 'compound nouns'. Some are more transparent (ie predictable from the components) than others.
Thus 'blackbird' (Turdus merula) seems quite transparent (no pun intended), until you see a brown one. You can have a brown blackbird, but not a brown black bird. So the term 'blackbird' might be classed as semi-transparent. 'Football' is a transparent compound, whereas 'light year' is somewhere between semi-transparent and opaque. As an obvious example, contrast 'blueberries' with 'strawberries' [the first totally transparent, the second semi-transparent].
An example of an opaque idiom (the meaning being [virtually] impossible to guess from constituent parts), 'kick the bucket' = 'die'. I'm not sure that any compound word is as opaque as this.
There are other terms describing the actual semantics involved in compounding words. With 'light year', the compound is not endocentric (the 'head' surely being 'year', whose sense is not retained in the compounding – contrast 'bird' in 'blackbird'). It is exocentric:
exocentric compound: A+B denotes a special kind of an unexpressed
semantic head: 'skinhead', 'paleface' (head: 'person') [/ 'light year'
(head: 'distance')] [Wikipedia]