I am apparently an outlier here in how cheaply I find vehicles, but I generally just ensure that my emergency fund is sufficient to cover a car replacement. Then when it's time for a new (well, different) car, I maybe ramp up the emergency fund for about 6 months, just for extra padding. So, as an example:
Normal E-fund: $5,000
Current car value: ~$2,000
New car purchase price: ~$3,000 (including any missed repair items that inevitably pop up in the first few months)
Sequence of actions: Save an extra ~$1,000 in E-Fund. While doing that, do all due diligence and research to decide which new (used) make/model best fits your use-case. Then find suitable vehicle for sale by owner (usually craigslist/facebook mktplace). Buy vehicle [-$3,000]. Then sell old vehicle [+$2,000]. E-fund is back to normal levels, and you have a new (to you) vehicle.
I generally look for vehicles that are very popular with high reliability ratings (e.g., Honda Civic/Accord, Toyota Prius/Camry/Corolla) at the bottom of their depreciation curve (generally '90s-'00s), so for me, sale price of the old vehicle is generally equal to purchase price of the new, so any extra money saved "just in case" can be swept back into investments.