Refer to How to remove Activation Lock - Apple Support There are only two ways to remove a lock:
Apple can completely reset a device if a person can provide sufficient evidence of valid ownership. Read the requirements and steps for an Activation Lock support request at: https://al-support.apple.com/#/additional-support Apple says you need to have "proof of purchase documentation” and “proof of ownership documentation”, but does not detail what currently constitutes proof other than it “must include the product serial number, IMEI or MEID.” User reports on this community indicate that typically Apple will ONLY accept an original receipt issued by Apple or an Apple Authorized Reseller. Presumably this is the only kind Apple can authenticate against fraud since Apple is not involved in third party sales. Apple recommends that you "Keep your receipt after you buy an Apple device" --> Keep your receipt after you buy an Apple device - Apple Support
Note that the device cannot have Lost Mode set on it. If your device has been taken over by you having entered a scammer’s Account then the scammer may have set that too and the device is lost to you.
Do not pay the scammer any money. They will probably just keep the money and not unlock the device, then you will lose both the device and the money.