As a general rule, a car should only be considered an investment if it's a collectible classic. Plenty of people try to justify taking out a loan for a new sports car or luxury car by saying it's an investment, but that's not the right way to think about it. It's true that some new cars actually appreciate in value over time, but those are exceptions to the rule, and they're unpredictable. There's really no reliable way to know which new cars will hold their value or gain more value, but it's a safe bet to assume they'll lose value.
It's smartest to think of a new car purchase like an appliance. It's going to start depreciating as soon as it's legally yours. It's there to be used, and it might break, and it'll need repair. It's OK to spend money on something that's losing value (that's just the nature of owning a car), but it is extremely unlikely that most car owners will ever recoup that money spent, let alone come out ahead.
A car is an emotional purchase for many people, no doubt about it, but trying to rationalize it by calling it an investment isn't a good idea. If you can't stomach the thought of spending tons of money on a depreciating asset, but need a new car, the smartest strategy to save money is to buy a recent model with good reliability scores and good fuel efficiency. It'll still be new to you, but the first owner took most of the depreciation hit.
If you're at the point in your life, though, where you have the time and the means to research and seek out the perfect classic car, as well as a safe place to keep it and the knowledge to take care of it, well, that's a different story. Experts suggest a few strategies for buying classic cars as an investment. First, at this point, you can't really treat it like a car anymore. Driving your investment is a huge risk and it can be taken away in a minute through no fault of your own. (Jay Leno is known for enjoying his classic car collection, but he's really rich.)
Also, make sure you take the time to find a car you like and can afford rather than jumping on the first opportunity that seems like a good deal. That's because the market for classic cars can function on trend cycles (just like everything else), and trying to game the market for the best times to buy and sell can backfire big time. Even if your collectible car loses value, according to the market, you'll still have something you like to look at while you ride out the fluctuations. If you can't stand the thought of seeing your investment lose value while it sits unused in your garage, investing in cars might not be for you.