If you see an "iPhone Locked To Owner" message:
Take it back to the person from whom you received it. Get them to do the things in this support article --> What to do before you sell, give away, or trade in your iPhone or iPad - Apple Support There is no way of discovering the owner of a device unless they left a message to display on the device when it is turned on. For information about how to request access to a deceased family member's Apple account data, and possibly their equipment, read this support article --> How to request access to a deceased family member's Apple account - Apple Support
Unless you have the account information that set the lock, the original receipt from Apple, or can demonstrate legal inheritance from a deceased owner, you cannot remove the lock; recycle the device. Read this article about how to remove Activation Lock --> How to remove Activation Lock - Apple Support
From the very bottom of Apple Trade In - Apple :
"Does Apple offer recycling?
Yes. Apple Trade In lets you recycle any Apple device (including devices from Apple-owned brands) at any Apple Store and on Apple for free. That includes your batteries and old electronic products as well as free, on-demand packaging recycling for our commercial, education, and institutional customers. When we receive your device, it will be thoroughly inspected to determine if components can be recycled or reused. Whether recycled or reused, all activities relating to the processing of your device will be managed in an environmentally responsible way."