That’s a lot of money for a used car when someone is just starting out and trying to build wealth.
I have no bias towards leasing, buying, or financing. All have benefits and drawbacks. In general when someone is starting out you are probably better off to finance a vehicle that is proportionate to your income.
The reason I say this is that your mileage patterns can change dramatically, your job can change, you can relocate, so leasing has constraints.
If you had cash and used it towards a car you would lose valuable liquidity and opportunity costs of holding the cash. Additonqally you may not have 23K sitting around to pay for the car.
Financing is a good option if you have GOOD credit. right now interest rates for new cars are around 5.5% to 6% on 60 months of financing. The payment is higher than a lease but you have a greater amount of flexibility at the end of the finance as to whther you wnat to keep the car, seel it trade it in etc without the dealership dictating the terms.