Take it back to the person from whom you received it. Get them to do the things in this support article or ask for a refund --> https://support.apple.com/HT201351 There is no way to discover the owner of a device unless they left a message to display on the device when it is turned on, or the person who gave you the device knows them.
Read this article about the two ways to remove Activation Lock --> https://support.apple.com/HT201441 This can be done by the owner, or by Apple upon request from the owner. The ownership of Apple equipment with an activation lock is demonstrated by access to the Apple Account that is signed into the device, by accepted documentation (e.g., a receipt from an Apple authorized reseller), or documented provenance from a deceased owner (in that situation read: https://support.apple.com/HT208510 ). If you can't prove to Apple's satisfaction that you are the true owner of the device, they just have to assume you are a scammer making up a story to try to get into another person's phone and will refuse to unlock it. In that case recycle the device.
From the very bottom of https://www.apple.com/shop/trade-in :
"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 https://www.apple.com/ 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."