Really it is a question of priorities:
1. Reliability - Generally a newer car is likely to be more reliable. This is not just about cost but also the hassle of finding a reasonable competent garage and having the time available to both take the car to the garage and be without it for however long it takes to be fixed.
2. Cost - Initial cost, depreciation, tax, insurance, fuel, servicing, repairs.
3. Performance - Higher performance usually means higher running costs.
4. Style - This is really personal preference and my current car is not a preferred choice for many members of motors.
By default I would look first at cars ages between 2 and 4 years old where vehicle is still likely to be in excellent condition but has passed the steepest part of the deprication curve. However, I have kept all my cars for over 5 years.