Used mobile phone are cheap and may not safe at the same time. You have to check many things before buying a used mobile phone.
Buy from its original owner: Are you buying from its original owner or not. If the seller is not the original owner you may face some legal problem if its a theft phone. Confirm seller identity if you are not sure about ownership.
Original Phone: Sometimes some fake seller may try to sell some fake or duplicate phone. You may cannot identify the difference. So to make sure get some one with you who is expert in this.
Original Display: Some times the phone may be repaired with a duplicate display. Any duplicate display is different from original one. Even touch system may not work perfectly with the duplicate display. Sometimes you may face problem even the display is changed with original one.  Display may to fit perfectly with the body. You may see air gap outside the edge of display. The front camera may not working properly or blurred after changing display. So face detection for unlocking phone may not work with this phone.
Check Battery health: Battery health is very important for old phones. If you are buying any apple phone, check the battery health from battery settings. For any other phone check battery level and restart the phone several times. Check the battery level falling how much. If its stable, the battery may good enough. At the same times charge the battery for few minutes. Check the battery level increasing how much. If you found the battery is charging very slowly there may some problem either in battery, charger, charging cable or charging port. If the phone has fast charging capability also check it. If the battery is draining very fast the phone motherboard also may be faulty. Even it may case overheating the phone without any reason.
Check charging port and Data Transfer: Check the charging port properly. Damaged or loose it may cannot charge the battery properly or takes extra long time to charge the battery. Even it may cannot transfer data using data cable.
Check buttons: Check all buttons. Check Power button, volume up and down and any other dedicated button is working properly or not. If buttons needs to press very hard to work it may not work properly after few days or may damage the board physically.
Check Headphone: Check headphone jack, connect a headphone check audio and calling also.
Check Microphones: Check the mic very carefully. Make a call with the old phone you are going to buy. Check the mic sound from the phone is clear to hear from another phone. Also check the loud speaker mic is working properly or not.
Check hearing sound quality: Check the sound from ear speaker in normal mode. The sound should be loud enough to hear from its internal ear piece.
Check Camera and video records: Check both front and rear camera quality. Check photo and video. Also check in low light. Some times old phone camera sensor may not work properly as it was. Check stabiliser is working properly with video while its shaking.
Check Unlocking features: Check all unlocking features like finger print, face detection etc working properly or not.
Check wifi: WiFi should work properly. Also check hotspot operation from this phone.
Check SIM and Card slot: Check both SIM and memory card slots. If the phone has dual SIM slot check individually.
Network and Data quality: Most of the case old phone network may not work properly. Sometimes you may get very weak signal from a phone. Also check cellphone data quality. Check 3G/4G/5G if possible.
Check sensors: Check all sensors. Light sensor to set automatic display brightness, proximity sensor to turn on/off display automatically while talking and take phone close to your ear and release again, orientation sensor, compass etc.
Vibrator: Check phone can vibrate or not. If phone vibrator is not working, you may miss calls or notifications in silent mode.
Full factory reset: Its very important to perform a full factory reset in the phone you are going to buy from another owner. Because the phone may have any unknown lock or any other tracking feature set by old user. Even some un authorised unlocked phone may stop working after a complete factory reset. You may see no network, invalid SIM or no WiFi after factory reset.