Resources:
Motivation: When installing an operating system using UEFI, a UEFI boot entry is stored in the non-volatile RAM ("NVRAM") of the motherboard (Wikipedia). Swapping the motherboard loses this boot entry, but you can simply create a new entry.
Boot into a linux environment using a live image, and enter the following commands:
# The encrypted storage is usually part of the second
# partition of your storage device (in this case, I'm working with an NVMe-Drive).
# "my_encrypted_volume" can be any name, doesn't matter.
> sudo cryptsetup luksOpen /dev/nvme0n1p2 my_encrypted_volume
# You now need to enter your password used for the
# encrypted drive.
# Then, you can see the decrypted partitions
# in /dev/mapper. Mount them.
> sudo mount /dev/mapper/voidvm-root /mnt/
# Mount the EFI partition. It's the first partition of
# your encrypted storage device.
> sudo mount /dev/nvme0n1p1 /mnt/boot/efi
# Enter chroot
> sudo xchroot /mnt
# Install/Restore the bootloader using your storage device
# (the device, not the partition!)
> grub-install /dev/nvme0n1
# (not sure if this is needed, but just in case for the initramfs)
> xbps-reconfigure -fa
# Unmount and reboot. Your drive should then be bootable as usual.
> exit
> sudo umount -R /mnt
> sudo reboot now