Activation Lock is a hardware protection scheme.
You clear it by entering your AppleID password.
If you ALSO don’t know your AppleID password see this:
If you forgot your Apple ID password - Apple Support
If you use Advanced Data Protection AND set up both a recovery key and a recovery contact, you can use either your recovery key or recovery contact to regain access to your account.
Ref: Set up a recovery key for your Apple ID – Apple Support (AU)
If none of these are available, your AppleID will remain permanently inaccessible.
You can then only possibly regain use of your device by submitting appropriate proof of ownership to Apple via an Activation Lock Support Request.
https://al-support.apple.com/#/getsupport