Thanks for the reply, really appreciate it; I figured it might be a long-shot to ask for a guide.
So the model is 'XT1965-3', and software channel is 'reteu'.
Before posting, I've been looking for how to unlock the bootloader, possible ways to root etc., and it was probably silly of me to try it without TWRP. But it is also likely that I've searched for the wrong thing. I had build PPW29.98-66 before trying the root with Magisk and without TWRP, so I assumed it could be done. But as of the factory reset, I'm back to PPW29.98-28. Before posting my original question, after factory resetting, I tried to re-lock the bootloader, in the hope that it would indeed make it possible to update, but in the end that didn't work. I got the same warning message about compromised integrity. So I have unlocked my bootloader again.
My experience using ADB and fastboot is limited to unlocking (and re-locking) the bootloader, from the PowerShell/command terminal with the phone connected to my computer. And my previous phone was a moto g4, which I also unlocked and rooted using ADB and fastboot, but that's a few years ago.
Even though my software channel is RETEU, I'm guessing it's okay to flash the RETAIL one. And I guess I should be doing it similarly to, e.g., (
https://www.getdroidtips.com/stock-rom-moto-g7-plus/) (method 2), except instead of 'mfastboot' at the beginning of every command I should use 'fastboot'? Also, the files aren't the exact same (in the getdroidtips-link just above, and the RETAIL firmware you linked), so which would I need to run (from the link you provided)?