can't mount /data while installing LineageOS
These /data-related errors are likely because TWRP can't decrypt the current /data partition. This often happens with stock ROMs, since TWRP is only made to handle the encryption method of AOSP.

To work around it, in TWRP, choose Wipe - Format Data. This will wipe all data from the device, but at the same time remove encryption and allow you to start off fresh. You can then reboot to recovery again to check if there are still errors displayed, and if not (it shouldn't), proceed with any other flashing actions.