This article explains how to reopen tabs or windows that you accidentally closed in the Safari web browser. You can also use the History list to reopen sites.
How do I recover all the tabs I accidentally closed in Safari?
You can open your lost tab using four methods. The first is to select Undo Close Tab from the Edit menu, or press Command+Z on your keyboard.
Another way to reopen a page you've closed is to click and hold the plus sign at the far right of the tab bar. Normally, you'd click this once to open a new tab, but holding it down will open a menu with a list of tabs you've recently closed. Select the tab you want to reopen.
The third way is to select Reopen the last closed tab from the History menu or by pressing Shift+Command+T on your keyboard.