Both "end-of-the-year" and "end of the year" can be grammatically correct, depending on the context. "End-of-the-year" is typically used as an adjective when referring to something related to the end of the year, while "end of the year" is used when simply discussing the conclusion of the year.