Open the Last Closed Tab in Safari on the Mac
Safari lets you undo your action of closing a tab--as long as you act promptly. If you close a tab by mistake and then open a new tab, you won't be able to restore the closed tab with the shortcut below, because the undo feature only works on your last action.
Reopen Closed Windows in Safari on the Mac
You can also reopen a Safari window with the tabs you had open even days after closing the window or quitting Safari.
If you have more than one Safari window open and close one by mistake, go to the History menu and select "Reopen Last Closed Window."
If you quit Safari and want to restart it with all of the tabs you had open last time, go to the History menu and select Reopen All Windows from Last Session.