To bring back your Safari windows and tabs after quitting, open Safari and choose History > Reopen All Windows from Last Session. To make session restoration the default, choose Safari > Settings > General and set Safari opens with to All windows from last session. Safari’s History menu is also the place to look if you closed one tab or window by mistake.
Restore the previous Safari session
Open Safari, then click History in the menu bar. Choose Reopen All Windows from Last Session to restore the previous session. Apple documents this command alongside options for reopening an individual recently closed tab or window. Apple’s guide to returning to websites in Safari
To have Safari restore the session whenever you open it, go to Safari > Settings > General. In Safari opens with, select All windows from last session. Depending on your macOS and Safari settings, you may also see an option for All non-private windows from last session; choose that if you want Safari to restore the non-private windows while excluding Private Browsing windows. The available options can depend on the system setting Close windows when quitting an app. Apple’s Safari General settings guide
If the option is unavailable or Safari opens a new window instead, check Apple menu > System Settings > Desktop & Dock and turn off Close windows when quitting an application. On earlier macOS versions, look in System Preferences > General for Close windows when quitting an app. Apple notes that this setting controls whether apps restore their windows when reopened. Apple’s instructions for controlling app windows
Recover a tab or window you closed
If you only need to undo a recent close, open Safari’s History menu and choose Recently Closed. You can also select Reopen Last Closed Tab or Reopen Last Closed Window. This is useful when a single tab or window disappeared but you do not want to restore every window from the previous session. Apple’s Safari History instructions
Safari also lists Shift-Command-T as the shortcut to reopen the last tab you closed; the same shortcut is listed for the last closed window. If the shortcut does not behave as expected, use the History menu to see the available commands. Keyboard shortcuts can vary with your Mac’s keyboard layout and language. Apple’s Safari keyboard shortcut guide
If Safari still opens without your tabs
First, confirm the session choice in Safari > Settings > General. If you normally quit Safari and have Close windows when quitting an application enabled in macOS, turn that setting off if you want the app to retain its windows. Then quit Safari and reopen it to use the updated preference.
If you are opening Safari immediately after restarting or logging out, check the Reopen windows when logging back in box in the macOS shutdown or logout dialog. That controls reopening apps and windows at login; Safari’s own General setting controls how Safari starts when you launch it. These are separate controls, so check the Safari preference when tabs fail to return after opening the app. Apple’s macOS window reopening guidance
Holding Shift while opening Safari prevents the previous windows from reopening for that launch. Apple documents this as a way to suppress restoration, so avoid using it when your goal is to recover the prior session. Apple’s Safari window restoration instructions
What restoration can and cannot bring back
Session restoration is intended to reopen Safari windows and tabs from a prior session. For a particular page, use History > Recently Closed or search History > Show All History; Apple says browsing history may be kept for up to a year, depending on your history settings. History helps you revisit a page, but it is not the same as restoring the exact previous set of windows and tabs. Apple’s guide to returning to websites in Safari
If the tabs belonged to a Private Browsing window, Safari may not offer that window for restoration; use the non-private session option where available, and remember that browsing history is not a record of private sessions. To keep a page for later, add it to Bookmarks or Reading List before quitting. For routine restoration, set All windows from last session and keep macOS’s close-windows-on-quit setting off.
Sources
Go back to websites you already visited in Safari on Mac — Apple Support
Change General settings in Safari on Mac — Apple Support
Prevent apps and windows from reopening on Mac — Apple Support
Keyboard shortcuts and gestures in Safari on Mac — Apple Support
Control which windows Safari reopens on Mac — Apple Support