What is the most bulletproof way to buy a decent used car?

(Edit: I hope this isn’t too off-topic. If it’s not an easy/short reply, maybe it’d be better as a linked topic? My bad if so.)

Any tips for the rest of us who only normally drive on trails, like for getting un-stuck from snow & mud (or better yet, not getting stuck in the first place)? My 2016 Subaru has a toggle for traction control, but the new ones seem to have various “X-Modes” for snow/mud/ice/lava/who knows what else. It’s not clear to me how pushing a button would magically make the car perform better…

I do wish Subie (or anyone) offered some advanced driving workshops for adverse conditions.