F22 M235i all day long. The N55 is bulletproof, the car handles amazingly, and its one of the last "real" BMWs with hydraulic steering. You can find good ones with 80-100k km in your budget.
Avoid the N54 335i unless you want a project car. Great engine but maintenance costs will eat your budget.
If reliability is important, go G20 320i. Its the newest platform youll get in that budget, B48 engine is solid, and itll have the lowest mileage. Not the most exciting but very comfortable daily.
If you want fun, M235i is the answer. But budget extra for maintenance.
Unpopular opinion but look at the F10 535i with the N55. You can get really nice ones for under 15k now. Way more car for the money than a 3 series, same reliable engine as the M235i, and the comfort is on another level.
Just make sure to get one with the 8-speed auto, not the old 6-speed.
if you can find a clean E46 330i with manual for under 10k, buy it and pocket the rest for maintenance. best driving BMW ever made imo. nothing modern comes close to that steering feel.
but im biased lol
whatever you buy, set aside 2-3k EUR for the first year of ownership. BMWs always need something when you first buy them - previous owners tend to defer maintenance. budget for that and youll be happy.
From a mechanics perspective: F22 M235i or F30 330i are the sweet spots. Both have proven engines, parts are readily available, and theyre not too complex to work on.
Stay away from anything with the N20 engine (old 328i/428i). Timing chain issues are a ticking time bomb.