Either get the account working again or ask Apple to reset the iPhone.
Refer to How to remove Activation Lock - Apple Support There are only two ways to remove a lock.:
#1 If you have the necessary information you can do this yourself by simply signing in with the owner account and password information. If you do not have that then you can try method 2 below.
Re. the account: Several years ago Apple transitioned to using two factor authentication instead of security questions. You can continue to use security questions if you already use them and they are working for you, but if you have problems then they no longer get direct support. You can try the directions in this support article If you forgot the answers to your Apple ID security questions - Apple Support but the article is labeled "archived" and may contain information that no longer applies. If the instructions work then fine; if they do not (e.g., you see “not enough information”*) then you will have no option but to change to the newer security method, if you can. Over the past few years Apple has been persistently encouraging users to switch to the newer two factor authentication security system. For those who have disregarded their encouraging, Apple will likely only help you to now change to two factor authentication, if even that is possible. Follow the instructions in the "Turn on two-factor authentication for your Apple ID" section in this support article --> Two-factor authentication for Apple Account - Apple Support to try to change to two factor authentication.
If you still need help, contact Apple Account support at this link ➞ https://getsupport.apple.com/?caller=cups&PGF=PGF63005
Select "Other Apple Account Topics", then "Security concerns or account compromised." This will give you a chat or telephone call option.
*See the third page of this discussion Unable to Reset Apple ID Security Questio… - Apple Community Some people talk about getting out of a “loop” by logging in a different way. I am not really following what they are talking about but maybe you can see if it helps.
#2 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.
If Apple resets the device this will give you access to the device but won't restore access to the account used to lock it. There is nothing that can be done to expedite an Activation Lock request.