Just for your information 1.17.1-q-herolte
was a “special release” the purpose of which was to ensure users did not bring forward Adoptable storage. Here is the link to the Release Note v1.17.1-q · e / os / 🚀 Releases · GitLab. I understand from what you say that you already tried to deal with this.
Here is a thread where a user had a similar problem Problem update 1.20 on Samsung Galaxy S7.
One simple thing, you might abandon that Upgrade and then
Settings > Apps and notifications > See all … apps > 3 dot menu top right > Show system > Updater > Storage & cache > Clear storage | Clear cache
After this you might Soft reset (no data will be lost) with Volume Down + Power at the same time, for 7 seconds.
Next time perhaps try the upgrade with no SD inserted.
There were quite a few suggestions in the linked thread, please try easiest ones first and report what happens.