Hard to compare them really. Each is unique in its own way.
Galapagos has the added advantage of very interesting terrestrial wildlife...giant tortoises, marine iguanas, flamingos, seals, numerous species of sea birds, etc etc.
Cocos imparts a distinctly surreal quality...the remoteness is striking and being uninhabited makes it special.
Diving in either place is world-class. We saw multiple-hundreds of sharks in both locations. Galapagos provided us with a 45-ft whale shark, squadrons of eagle rays, white-tips, turtles, and PENGUINS. That's hard to beat.
Cocos had it own spectacular sightings, no whale sharks, but hundreds of hammerheads, white-tips, marbled rays. Watching white-tips mating was a high point in addition to seeing a gigantic baitball of green jacks that was being decimated by tuna, sea birds, and silky sharks.
Pick one, you won't be disappointed.