Having installed the recovery twrp and having adb the installation goes easy.https://wiki.lineageos.org/devices/i9300/install
Download a LineageOS zip file as Lineage 16.0 that comes with Android 9 (alternatively as the lineage guide shows you might want to try to build one yourself) to your computer
Download the google apps https://wiki.lineageos.org/gapps.html to your computer
Download the Lineage extras https://download.lineageos.org/extras to your computer
Put the android device in recovery mode using the special button press power up sequence or ./adb reboot recovery to get twrp
Consider to backup the existing system ROM
Do Wipe and Format Data
Go to Advanced Wipe and select Cache and System and then wipe
Do advanced ADB Sideload on the device
On the computer do adb sideload <filename>
.zip to move the file to the device and repeat this for all files
Use twrp to reboot the system