To reinstall the OS, you can try the factory reset function in the settings menu.
If that does not solve the issue, you can reinstall the latest image using ADB sideload from the recovery but be very careful about Android version incompatibilities ! To check that, you can open Lineage OS documentation for your device and look at the “Upgrade” page.
Or else simply follow the manual/command line instructions for installing /e/OS on your device as if it was still running Google Android.
About not loosing your data, if your current /e/OS is 4.1 or above, then you can use the great MurenaBackup feature to save the settings and use their cloud to store contacts and calendar, and copy manually the local storage to a PC (if pictures are not synced in Murena Workspace).
In case your are running a version below 4.1, then refer to the backup procedure of the /e/OS documentation that tell you how to backup apps (only) with the package manager app. Beware that it will not save any settings nor local storage documents !