I had an old 14.4v Makita, really good bit of kit. In the end the batteries died so it would only run for a few minutes. You can find aftermarket replacements that would work, but I went with a new Makita 18v.The batteries are detachable.
You can buy new ones. It’s just not clear to me if they fit in the old drill, and I can’t see a way to test without having to buy one to find out!
You can use the 18v batteries on their other stuff like jigsaws, lamps, radios, hedge trimmers, etc. all of which you can buy without a battery to make them cheaper.