You can do that just be aware that you will eventually be spending more than just buying a new car just to keep the current one in good repair. Car collectors get around this because they use have a different car as the daily driver, and their collected car is repaired and only used in parades and such.
You are also turning away a lot of the advances in electric vehicles. Paying for gas in your old car, could be more than payments on a brand new electric car. (that would require a lot of driving.)
You are also increasing your risk of death or serious injury. New cars are far safer in a collision than cars made 15-20 years ago.
Parts availability can be a problem, but especially if you drive a once popular model and are willing to do work yourself, the mileage you can get out of junkyard parts is significant.