The only way to recover your iCloud password is to reset it by navigating to AppleID.Apple.com, clicking on the Reset Your Password link in the Manage Your Apple ID section and selecting one of the three available options. Once you confirm that you own the account, enter the new password.
You can reset your iCloud password by answering the security questions you set up when you created the account, by using email authentication or by entering a recovery key. After entering the recovery key and selecting a trusted device, you are sent a verification code to the selected device, allowing you to enter a new password and select the Reset Password option. To finalize the process, use your new password to log in to iCloud and any other service that uses your Apple ID.