In the Tabs section, check the box next to “Use ⌘-1 to ⌘-9 to switch tabs. Open Safari, click the Apple logo on the menu bar and select Preferences.
If these shortcuts are opening your bookmarks instead, head to Safari’s preferences menu and activate the tab switch option. You can do this up to Command + 9, which opens the last or rightmost tab.
Say you have 12 open tabs on Safari, pressing Command + 1 will switch to the 1st tab (from the right), Command + 7 will open the 7th tab, while Command + 3 opens the 3rd. Repeatedly press the shortcut to select another tab when you release the keys. Safari also lets you jump directly to the first 8 tabs and the last tab using dedicated shortcuts. Press Alt-Tab to quickly toggle between the current and last viewed window. These key combinations will take you one step backward and open the tab on the left: Command + Shift + Tab or Shift + Command + Left Squared bracket ( [ ).
Shift + Command + Right Squared bracket ( ] ) is an alternate shortcut that’ll yield a similar result. Press Control + Tab to jump to the next open tab on the right.