See Turn off Activation Lock https://support.apple.com/en-us/HT201441See this heading If you erased your own device "If you don't sign out of iCloud before you put your device in recovery mode and restore, it might remain in Activation Lock. That means you need to enter the same Apple ID and password that you used when you previously set up the device."
See If you forgot your Apple ID https://support.apple.com/en-us/HT201354
If the above information does not work for you, then see below.
Ignoring extenuating circumstances, activation lock can be turned off only by entering the correct Apple ID/password combination. The correct combination is in the one used in setting the device up prior to activation lock being enabled. Note that there is no way we can help you to systematically recover the pertinent Apple ID password. Standard recovery procedures simply cannot work if activation lock is present
Thus, we will not be able to do anything for you except to mention that Apple Support may be willing to help you if you have an extenuating circumstance (e.g., you have the receipt for your purchase of the device with its serial number on it or a court order instructing Apple to assist in the provision of access to a decedent’s information from the deceased person's accounts). See How to request access to a deceased family member's Apple accounts https://support.apple.com/en-us/HT208510.
So, if you have an extenuating circumstance, you can contact Apple support for help with your problem using these options:
Get a call from Apple support to help solve your problem using this link https://getsupport.apple.com/?caller=kbase&PGF=PGF63005&category_id=SC0245&symptom_id=23362
Apple ID Support https://support.apple.com/apple-id
Apple ID account security for country-specific and region-specific help https://support.apple.com/en-us/HT204169
Get Support: We’re here to help https://getsupport.apple.com/. Go through the options to find the best support option.