First, in this case as in many others, you can use either “the” or “a” without it sounding too bad. Which of the two is (marginally) better has to do with how definite you want to sound.
Superman has the ability to fly. (It’s clear and well-known)
Jessica Jones has an ability to jump high. (Not as clear, more ambiguous)
As far as “ability to make money”. “Ability “ isn’t the usual word to use. By default, making money is something you do in return for doing something else. It’s not intrinsic to the person and not noteworthy. So what are you trying to convey by describing it as an ability? These are much more significant than the debate over the/a.
John can earn money.
John can make money.
John has the capability to support his family, if only he’d stop drinking.