The repeat beaters is a massive financial trap that really makes it hard to get going. Are you mechanically capable? That and solid maintenance makes owning a beater much cheaper.
So many people sell cars because they know about impending repairs. The dealers don't even check or hope you won't notice when you buy it.
Youtube is full of videos about the common problems on most cars. They all have them, but you can come informed on how pricy, how to check if it is already failing, and what maintenance to do to avoid it once the car is yours. Research before purchase, maintenance after, and a little bit of luck is the path out.
Once you are out of that trap and established financially, fresh off lease low mileage to buy still following the rules above. Then do your maintenance religiously and keep it as long as is possible. I bought my 12 year old truck 10 years ago, paid off for years and still serves me well.