I bought a second phone for a family member.
Each Apple device is linked/associated with an Apple ID of the person who did the setup.
Activation Lock prevents anyone who is not the owner from using this iPhone.
To unlock the Phone, you need the Apple ID and password of the previous owner, that were used during set up.
So you have to contact the previous owner.
The previous owner has to read -> this Apple article: What to do before you sell, give away, or trade in your iPhone, iPad, or iPod touch
What to do before you sell, give away, or trade in your iPhone, iPad, or iPod touch - Apple Support
Then the previous owner has to remove the iPhone from his account, see this Apple article:
Check your Apple ID device list to see where you're signed in
Check your Apple ID device list to see where you're signed in - Apple Support
Then you can sign in with your Apple ID.
See the following Apple articles:
Activation Lock for iPhone, iPad, and iPod touch
Activation Lock for iPhone, iPad, and iPod touch - Apple Support
See -> How to remove Activation Lock
How to remove Activation Lock – Apple Support (UK)
The All Too Common SAD Reality of Buying a Used iPad/iPhone
The All Too Common SAD Reality of Buying … - Apple Community
You can contact Apple support for help.
You have to show proof of ownership of your product, provide all documentation showing your purchase of the device.
If you do not have additional proof of ownership, contact the reseller. They may be able to provide the original purchase document.
The device's serial number or IMEI must be on the document. If neither the serial number nor the IMEI is on your document, write the number on the document reflecting the purchase of the device.
To find your product's serial number or IMEI, visit: Official Apple SupportHT204308
Use this link to submit your documentation:
https://cryptozen.apple.com/onveilige/U620cacfba8fca4d17b9266a65be47221/en_AU
Once Apple receive your proof of ownership, Apple will further review your request and provide an update.