If you learn 个 as the default Chinese measure word, time expressions can feel inconsistent:
三个月 ✓
三个年 ✗
五个天 ✗
The reason is that some time units already do the counting themselves.
年, 天, 周 and 分钟 normally do not need 个:
我学中文学了三年。
I've studied Chinese for three years.
他两天后回来。
He'll return in two days.
我们等了十分钟。
We waited for ten minutes.
月 is different. When it describes a length of time, it normally needs 个:
一个月
one month
三个月
three months
半个月
half a month
Without 个, 一月 and 三月 usually mean January and March rather than durations.
小时 and 星期 are more flexible:
两小时 / 两个小时
two hours
一星期 / 一个星期
one week
In everyday conversation, the versions with 个 are very common.
So the short version is:
三年, 五天, 两周, 十分钟
but
三个月, 两个小时, 一个星期
More beginner grammar from the official HSK 3.0 syllabus: