Hi there, what version is your LineageOS? since you mention TWRP which hasn't been recommended for some years..
Anyway from what you wrote you want to keep the current system installed. On my LOS 22.1 (but it's worked like this for ages, even on stock roms): you go to Settings -> System -> Reset Options -> "Erase all data (factory reset)"
Or just search "factory reset" in the settings.