@aral thanks for this write up: https://ar.al/2018/07/15/flashing-stock-firmware-onto-a-samsung-galaxy-s9+-sm-g965f-on-ubuntu-18.04-using-heimdall/
I was getting frustrated that there was no real explanation on how to do this in a clear way!
@minkiu Glad it helped :)