"which" command doesn't work / path of Safari?
which searches for binaries in the $PATH, a.k.a. command-line tools. User applications are not such tools and not available in the command line.

While Safari.app is an application, the Safari binary is not usually added to the $PATH because it is not a command line tool — if you just run Safari in Terminal your shell will inform you that the command cannot be found.

To find the path to an application, you can use lsregister, which is a tool for adding and querying the Launch Services database, used by macOS in part to find applications.

/System/Library/Frameworks/CoreServices.framework/\
  Versions/A/Frameworks/LaunchServices.framework/\
  Versions/A/Support/lsregister




You can -dump the database and filter with grep.

/System/L*/Fr*/CoreSe*/V*/A/F*/L*/V*/A/S*/lsregister -dump |
  grep -ie "path:.*safari"




    path:          /Applications/Safari.app


This will return every instance of Safari registered with Launch Services, which will include backups. If you just want to open Safari, you shouldn't be dealing with getting paths and handling it yourself; instead, get macOS to do that for you: open -a Safari.