Thanks @Qiqo for sharing your steps, but at step 0. I already started to sweat because it means I have to unzip the stock rom, then untar the AP, BL, CP and CSC, And decompress the lz4 files.
Enter odin4 for Linux. Download it from XDA here
Download stock firmware for your device here
In my case I’ve downloaded SM-G973F_BTE_G973FXXSGHVI4_G973FOBEGHVI4_G973FXXSGHVI4_G973FXXSGHVI4.zip which is a lower version than the one that gave me errors.
Do not rename the files because the md5 check will fail!
Reboot, I saw error but it booted stock rom eventually, phew!
Then I repeated the process as written here and got greeted with the bouncing /e/ logo, after that setup phone.