Most writers either use these two words indiscriminately or simply choose cooperation without even reflecting on the alternative collaboration.
The main difference between the two words is that collaboration involves people working together towards a shared goal, while cooperation implies somebody working to support somebody else’s goal.
As a copyeditor, I work with the author of a text. The author wants me to make sure the manuscript is in fluent English without any linguistic or factual errors. (You can read here about how I work.) The author may ask for comments on a certain passage and I may want clarification of what the author intends. I can suggest an alternative formulation. Our shared objective is an article that deals with an interesting topic, has perfect language and format and is of such a quality altogether that it can be accepted for publication. That is collaboration. Collaboration is teamwork requiring mutual respect, trust and adaptability.
In my job as a copyeditor I may come across a word that is totally unknown to me. I can then call an expert to ask about that word. For example, I once called the coast guard to ask what word they used in a certain context. Thanks to their cooperation I could achieve my goal – to use that word correctly.
Should you have a hyphen or not? The answer is here.
Perhaps some writers hesitate to use the word collaboration since it has a less agreeable connotation. A collaborator is someone who helps an enemy that has occupied their country in a war.