Ok, let’s root Samsung Galaxy S9.
First ->sudo apt install heimdal-frontend
Go to Github and download heimdal -> https://github.com/GrandPrime
Download right TWRP at twrp.me
Set your phone in download mode and follow heimdal-frontend docs.
Other download place for heimdal: https://bitbucket.org/benjamin_dobell/heimdall/downloads/?tab=downloads
If this ain’t enough you always can use Google