If the iPhone is marked as lost and is not associated with your Apple Account, then it’s bricked until the person holding the Apple Account associated with Activation Lock removes the lock, and disabled marked-as-lost if set.
If this is your Apple Account and you’ve forgotten it all:
As can arise in some of these threads… If y’all were convinced to transfer ownership of your iPhone to another Apple Account for some benefit, you got scammed. The iPhone is usually marked as lost, and which means it is irrevocably and forever a brick. Unless you pay the ransom hoping the scammer won’t just keep the money and leave the iPhone locked and try ransoming it again.
If marked-as-lost is not set and if you have an original purchase receipt from Apple or an Apple authroized reseller showing the serial number or IMEI, you can request Apple remove Activation Lock: