This is a common problem, and something you can easily overcome. Let’s start with what you absolutely should NOT do:
Get a car payment! You may feel like your back is against a wall, and maybe you can afford a car payment, but it puts you farther away from building wealth. Cars go down in value, so why pay over time for something that's automatically worth less?
Break the cycle now by doing the following:
Mentally commit to no more car payments. This is easier said than done, but that's often because our minds have been wired to get a loan whenever we need a new car. There are other options. But those won't happen if you've already decided that you must have a particular car, which must have "x" features. The end game, being able to drive whatever you want, pay for it in cash and have more than enough left over to take care of your other needs and wants, is what's most important.
Hustle and save. Map out a strategy and timeline to save $3,000-$5,000 for your new car. Then work on getting rides to and from work, learn the bus route, and/or look into buying a cheap bike. (Plenty of people restore old bikes and sell them online.) Be uncomfortable for a minute.
Seek out reputable mechanics who restore cars. My sister has purchased two restored cars for thousands less than the dealership. Her Honda and Toyota both ran as well as newer models, lasted years, and she swears by the mechanic/restorer.
Find a small or independent dealer. I bought my last two cars from independent car dealers who kept me in mind when they visited the auto auctions. These cars are typically in great shape because they're being prepped to sell to dealers. They know my price range and the type of car I'm looking for. The catch is that I can't be too picky about model, color, etc. Also, the dealer must be reputable and come referred.
Reach out to your network. My brother just paid less than $3,000 for a Camry that my cousin wanted to sell. It's clean, only had one owner, and runs well. My cousin never mentioned he was considering a new car, so if my brother hadn't said anything both would have missed out.
Release what should be. Paying for a car with whatever cash you can save will likely not yield you as nice of a car as you can get with payments. But you're trying to build wealth, so riding around in an okay car today will be more than worth it tomorrow.
The first car I bought cost $2,800, and every few years I've traded it in for something better. In that same time I've also paid off all debt outside of my mortgage, traveled (just returned from Vienna, Austria,) am maxing out my retirement and saving for my next car, another Lexus. (Yes, I've already had one). No car debt, ever. You can do the same.
And so it is.