TL;DR: Candies are shared, if you want to get a Golem you need to stop evolving Geodudes until you have enough candies.
Candies aren't specific to an individual pokémon - they are shared across an evolutionary line. This means that you have a pool of Geodude candies that any of your Geodudes, Gravelers or Golems can dip into and use.
If you have 25 Geodude candies then you have enough to evolve a Geodude into a Graveler. This will consume all 25 of those candies from your shared pool, then give you 1 back as a reward for evolving the pokémon. But this also means that you'll now be 99 Geodude candies short of evolving Graveler into Golem instead of the 75 short that you were previously.
Remember: the pokémon in each evolutionary line all use the same candy for everything. Geodudes uses 25 Geodude candies to evolve into Graveler and Graveler uses 100 Geodude candies to evolve into Golem. If you're spending stardust to power them up, all three will use one or more Geodude candies in conjunction with the stardust to increase the pokémon's CP.