The word "gear" has lots of senses that are not related to cogs. You can't replace the word "gear" by "cog" in these examples:
I put the car in gear and moved off.
I've got my camping gear, like my tend and sleeping bag.
There are some idioms using "cog" to mean "cogwheel" or "gear wheel" in which you can't replace "cog" by "gear":
He is just a cog in the machine.
Moreover a "cog" or "cogwheel" refers to the shape, but "gear" links with the function. In the strict sense, a "cog" is a tooth on a wheel. A cogwheel is any wheel with teeth. A gear is a cogwheel used mesh with another cogwheel. And a sprocket is a cogwheel that links to another cogwheel by means of a chain. A car's transmission has several gears. A bicycle uses spockets and a chain.
In common use it sounds more natural to say "he decorated his hat with cogs" than ... with gears". You are referring to the shape of the wheels, and not their function. The word "gear" suggests a heavier wheel designed for power. You car's transmission has gears, but your watch uses cogs.