Typically you don't need to replace the capacitor because it has gone bad itself. You need to replace the capacitor with a bigger one with higher capacity to start your worn out, possibly fluid deficient compressor.
Your compressor might run a few more years after that, or it might not. It's a bit of a roll of the dice. In any case if it needs a hard start capacitor it's closer to the end than the beginning.
I'd rather spend just a little bit and have it checked to make sure that the refrigerant is at full capacity, etc. than have it die during the next heat wave. Save money by replacing the capacitor itself, but make 100% sure that your refrigerant is fully charged.