Given that you acquired the device second hand, the following information explains what has happened. You apparently didn't know to heed the advice given below.
"Before you buy/acquire an iPhone, iPad, or iPod touch from ... [a third party], make sure that the device is erased and no longer linked to the previous owner’s account."
And see: Activation Lock for iPhone, iPad, and iPod touch https://support.apple.com/en-us/HT201365.
See this heading Check for Activation Lock before you buy/acquire a device from someone else.
The presence of activation lock means that we can't help you. We are not authorized to remove the activation lock from any device. And, under your circumstances, Apple support will not remove it since you cannot provide proof of ownership that they will consider to be sufficient. You would need and have your purchase receipt for the device from an authorized Apple seller with the device's serial number on it.*
If you don't have the receipt, the device is useless to you.
*Rarely, an iDevice is purchased activation locked from an authorized Apple seller.