Your terminology is confusing. There's a "recovery" key, but that applies to Apple accounts, not devices. See this article about recovery keys --> How to generate a recovery key - Apple Support
If you cannot get access to an account that is set on an iPhone but you think you can prove to Apple's satisfaction that you are the iPhone owner, try using this service --> Activation Lock support request Apple says, "Proof of ownership documentation is required," but does not state what currently constitutes proof. Prior to this new online service Apple typically required the original receipt issued by Apple or an Apple Authorized Reseller and documented provenance (so typically it would be the original owner who does this, or a descendant with legal proof of ownership).
Apple recommends you "Keep your receipt after you buy an Apple device" --> https://support.apple.com/HT202711