the simpler your vehicle, the longer you can theoretically keep it going.
Modern vehicles, I think 10 years you can get parts, after that, it gets difficult.
Ironically certain parts are easier to find for my old '98 Jeep than for my '07 Jeep, maybe because the '98 has a lot of common parts with Cherokees and Wranglers which are popular for restoration. And there's just less tech in them. The '98 has maybe 4 modules vs the '07 which has a lot more. And working on a Jeep 4.0 six vs a 5.7 Hemi, well I love the Hemi but every job on that thing, is time consuming, vs the 4.0 six, very easy.
Personally, I think it's a conspiracy between the automakers and the regulators. Regulate strict regulations, that require all kinds of specialized technologies and expensive parts, then quit making those parts, and make vehicles un-repairable.
Whereas, you can always fix a '69 Chevy. Small block parts, Quadrajet parts they are everywhere and cheap. That's why I still have my old boat. Much easier than later models with similar engines but EFI. Many of those EFI parts for OMC, Volvo or Merc are NLA! Carbs, you can always fix, or replace, a points distributor, you can always pop in a new set of points, no worry about that dang module that is NLA!