If you are on OFFICIAL LineageOS 16.0 you can't directly move to UNOFFICIAL ROM without wiping data.
to upgrade from OFFICIAL 16.0 to 17.1 Follow the guide :
1. You can download latest firmware from : https://xiaomifirmwareupdater.com/miui/beryllium/ and flash it before insatlling rom.
2. If you are factory resetting or wiping data you don't need to worry about FBE and encryption.
3. Consider upgrading recovery to OFFICIAL image before formatting
So, since, yes, I'm gonna wipe data before upgrading, I could run the following steps:
- download and install latest recovery TWRP version (v3.5.x) (is it correct as first step here?)
- download and install latest stable firmware (V18.104.22.168.QEJMIXM)
- format /system, /data and /cache
- flash LineageOS v18.1
- flash Gapps