Modern versions of Safari for Mac have a unique History keystroke that allows you to open prior windows and tabs from history in reverse chronological order. For example, let’s say you have closed 10 browser tabs over the course of the last hour, then hitting this keystroke 10 times would re-open each of those closed 10 Safari tabs. But this history keyboard shortcut goes beyond that too, it can also be used even after Safari has re-launched, meaning you can open the Safari browser and quickly open whatever the historically opened windows and tabs were, again depending on the number of times you hit the keystroke.
You will need a modern version of Safari to have this feature on the Mac, you would need to update your browser and MacOS to a newer version if you do not have the ability.
The Safari Historical Tab Recovery Keystroke for Mac: Command + Shift + T
From Safari on the Mac, simply hit Command + Shift + T and you will reopen the last closed browser tab or window.
Hit the Command + Shift +T keystroke again and you will open the next most recently closed browser tab or window. Hit it 20 times, and the 20 most recently closed browser tabs and windows will reopen. Make sense?
If keyboard shortcuts aren’t your thing, then you can also access this exact function from the “History” menu by choosing “Reopen last closed tab” but note that if you want to open the past 10 closed tabs or windows you would need to go to the menu 10 times.
Another helpful approach is to browse Safari history directly, or to browse through closed tabs in Safari by looking at a list within the Tab menu itself.
This is a wonderfully helpful history shortcut that is unique from the traditional longstanding feature to undo closed tabs with Command + Z (the general Undo command), which does continue to work in modern versions of Safari on Mac too, but in a more limited capacity and not after relaunch.
The trick obviously pertains to the Mac, but Note the iPhone and iPad has a similar feature iPhone and iPad has a similar reopening closed tabs feature too.