If you want official Oreo, you will need to use Ubuntu/ oracle virtual machine, & gparted live to set the partitions & flash Oreo.
Their is a switchroot XDA guide.
if you wan’t to use Android Pie, which although never released officially, runs 100X better
Use Hekate, Tools, SD Partition
Back your files up with USB Mass Storage option/ sd UMS to your computer
drag the sliders and format your SD card
Allocate space to horizon/emmummc & Android user.
Click next and let hekate format.
Either build android pie with the Githib guide & docker, ZachyCatGames also has a brilliant “shitty pie guide”(the irony).
If you are lazy, or incapable of building pie many premade builds exist.
I recently stumbled on this trying to find out more about android 10 progress/performance, although it is a pie build NOT 10
Use Hekate to flash android/
Reboot to TWRP, install & flash your desired zip files
Use Hekate sd UMS to restore your files.