Among the several ways you can unlock a LUKS partition, there can be a useful way in case things go south. This solution is to create a recovery key. This is like a passphrase only generated by the computer. This is done through the following command :

sudo systemd-cryptenroll <encrypted partition> --recovery-key

the recovery will be printed out on the screen. You can now copy it and put it in a safe place like a password manager.

The tool also generates a QR-code of the recovery key that can be printed out and used in case you lose the recovery key through a camera.