The iPhone 5, which was released in 2012, is now considered obsolete according to Apple's list for vintage and obsolete products. Apple recently moved the iPhone 5 and the 8GB iPhone 4 from the vintage list to the obsolete products list.
See also: Apple executive says Samsung copied the iPhone

A product is considered “vintage” when it has been five years since it was last sold, and “obsolete” when it has been seven years, although Apple sometimes extends these time limits. For vintage products, Apple Retail Stores and Apple Authorized Service Providers can provide repairs as long as the required parts are available.
Devices that are obsolete are generally not eligible for repair and Apple stops providing repair parts.
See also: Apple iPhone 15: Will it come with a USB-C port instead of Lightning?

Apple released the iPhone 5 in 2012 and discontinued it in 2013 after the launch of the iPhone 5s and iPhone 5c. The iPhone 5 was added to the vintage products list in 2018, so repairs were limited based on parts availability. Now that the device has been moved to the obsolete list, repairs will be largely unavailable.
The iPhone 5 featured a refreshed design with a glass and aluminum body, a taller 4-inch display, LTE support, and the first Lightning port that replaced the 30-pin connector.
See also: Apple expands Tap to Pay on iPhone to 5 more countries

Regarding the 8GB iPhone 4, which was also added to the list of obsolete devices, Apple introduced it in 2011 and discontinued it in 2013. Both the 8GB iPhone 4 and the iPhone 5 were sold as budget devices in emerging markets after their withdrawal from the United States.
