You must have erased it without signing out of iCloud first--which might leave it activation locked. If so,
See Turn off Activation Lock https://support.apple.com/en-us/HT201441
Briefly, to remove the activation lock you will need to have the Apple ID password used by the person setting the device up prior erasing it. Perhaps you forgot your Apple ID. Do you want to help you try to recover it? Otherwise, we can't help with activation lock, and Apple support will not help unless there are extenuating circumstances (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). To deal with the possibility you have an extenuating circumstance, use these support 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.