As Ronald Sole said, both are possible.
The first variation makes total sense. You are talking about buying a car; any car.
The second variation however seems a bit off. The writing in the second variation says that the car you bought has some significance; it is not just any car. But the title does not capture that implied meaning.
A story about how I bought a car.
I bought the car two months ago; the car of my dreams that is. It is red.
If in your title you are talking about the same car (e.g., your dream-car) as the one in the body, it would make more sense to use "the" instead of "a" in your title.
However, if your story goes something like this - you bought your dream-car; for some reason you lost all your wealth and had to sell your expensive dream-car; after years of struggle you were once again on your feet; and this time you just bought a car and you were happy to just have any car - then it would make sense to use "a" in the title. The story is not really about any specific car but your struggles and hard work, and how you were able to succeed and buy a car.