@kernelpancake Download a version of recovery from the twrp website. Make sure you are downloading the device version.
Download the stock version from the link provided by the) installer program.
That's version 9 of Android.
Leave the phone in fastboot mode, go to the folder where you have the recovery download and enter "fastboot boot twrp.img" in a terminal.
Once the recovery starts, delete everything, go to the advanced options and you will see that there is a sideload option.
Then once started, with the Zip file of the stock version of Android you write in the terminal "adb sideload stock.zip" (stock.zip is the example of the name.)
Just in case, do the process on both slots.
Once finished, you can start the phone normally and update it as you normally would
I am sorry if I have not explained myself well and I feel my English. I use google translate