[Redmi Note 10] Zirila:
I got this error too one time.. I don't remember what helped, but I've installed LOS so many times on this phone in the meanwhile that I know of other ways that pretty sure works. give this a try:

you need:

the TWRP alpha build twrp.img,

latest android platform tools (adb+fastboot),

latest redmi firmware.zip (link found in first post of the thread),

the lineageOS ROM.zip.

if you need to make a clean flash: MiFlash Tool and the current/latest MIUI ROM (links found in this forum)

I make this guide a more-than-usual detailed step-by-step guide so many users can follow.

start from a clean stock flash (flash the current/most recent official MIUI ROM with MiFlash, make sure you check "clean" and -not- "clean and lock" at the bottom before flashing, otherwise you lock your phone again)

now the phone has MIUI and slot "a" is active, just boot to it and create a PIN/3-dot-pattern (in some cases TWRP can't decrypt data with default PW when you don't set this)

switch off your phone, restart it into fastboot mode (vol-down + power).

connect it with your PC, have the latest fastboot.exe from the most recent platform tools (https://developer.android.com/studio/releases/platform-tools)

set the active slot to "b" with: fastboot.exe --set-active=b

load the TWRP.img (currently the alpha build from this forum) with fastboot: fastboot.exe boot twrp.img

load firmware.zip, lineagerom.zip and twrp.img to your phone: in TWRP enable MTP and copy files from your computer to the phone. if this does not work, see next step.

Then install firmware.zip, then lineageOS.zip. lineageOS gets installed to slot "a".

(if the above step fails to copy files to your phone try ADB sildeload:

in TWRP go to advanced -> start ADB sideload. in your console cmd: adb sideload firmware.zip, and: adb sideload lineageos.zip. it installs the ROM to slot "a". there might be an error at the end but it works anyway.)

switch off the phone. return to fastboot mode (vol-down + power)

make the active slot now "a" with fastboot.exe --set-active=a

reboot your phone normally to system, let the ROM start. at this point you should be able to launch LineageOS but without recovery. Load it so you can set up a PIN or 3-dot-pattern and then enable MTP connection with your PC.

copy the TWRP.img (and if you want Magisk.zip) to your phone (internal/external storage), we want to install TWRP recovery now.

switch off the phone, boot into fastboot mode.

start TWRP with: fastboot.exe boot twrp.img, enter your PIN/Pattern to decrypt your user[0] data, in TWRP now go to Advanced -> install TWRP to ramdisk. select the TWRP.img you uploaded before. TWRP gets installed to slot "a".

reboot your phone to recovery: Reboot -> Recovery.

If you want to use Magisk/Root, go to Install -> Magisk.zip (If you want to use a custom Kernel in the future, flash the kernel before Magisk)

now reboot to system, LineageOS should start normally and you can finish installing the rest.

Lets note that this works at the stage of TWRP alpha with current available LineageOS (2021-06). Future versions of TWRP and LOS may change these steps completely.

also if you have an error intalling or flashing files due to an snapshotted state (happens when you mess up custom ROM installation before and switchin a/b within TWRP), cancel the snapshot first with the command:

fastboot.exe snapshot-update cancel