TLDR: Apple suggests that buying a second-hand iPhone can be a good option due to their long-lasting design and frequent software updates. They provide guidelines for assessing the credibility of sellers, whether buying online or in person, including checking the external condition, functionality, password lock, repair history, battery health, button and camera functionality, speaker and microphone quality, and screen brightness.
In a move that may seem peculiar for a company that primarily sells new iPhones, Apple has released official guidance on how to inspect when purchasing a second-hand iPhone. They begin by explaining that Apple designs their products to be long-lasting and provides software support for several years, making used iPhones a viable option for those who wish to experience the iPhone.
For those considering buying a second-hand iPhone, Apple recommends starting by evaluating the credibility of the seller, especially when making online transactions. Additionally, for in-person purchases, Apple advises a preliminary inspection. This includes checking for external damages, ensuring the iPhone powers on properly, verifying that it is not locked with a password, examining the repair history, assessing the battery health, testing various buttons, evaluating the camera, speaker, microphone, and ensuring the screen brightness meets expectations.
Source: Apple via MacRumors