In your Safari menu bar click Safari > Preferences & then select the Advanced tab.
Select: “Show Develop menu in menu bar”
Now you can click Develop in your menu bar and choose Show Web Inspector
See the detailed guide here for more info:
LINK
You can also right-click and press “Inspect element”.
EDIT
As suggested by @dennis in the comments: If you dont see “Show Develop menu in menu bar” you may need to run DevToolsSecurity -enable
in the console before the option is visible