I grew up hearing all sorts of addages about vehicles. "New cars lose tons of value as soon as you drive off the lot, so you're much better off buying used".
Once I grew up and started buying my own cars, I learned that the best miles a car has are usually right out of the factory. The sound dampening wears over time. The foam in the seats wears out. Scratches accumulate, colors fade, odors accumulate. Hoses leak, mechanicals fail.
A lot of this can be fixed, or mitigated with proper maintenance. But the ultimate lesson I learned is that the resale value only matters if you actually intend to sell the car while there is still meat left on the bone. I'm fine driving a car into the ground until it's scrapped, so I don't factor resale value into my purchasing decisions.
Even back in 2018 I noticed the price gap between new and used cars wasn't as wide as I remembered it being back in 2011. I ended up with an Impreza with ~12k miles for $17k, but a new one would have been just over $20k. I was strapped for cash at the time, but I wonder if a new car would have been a better value even back then.