When I quit Safari via its Menu or CMD+q, it properly restores saved tabs.
However, if I close it via X icon (top left) or by quitting it via right click on its icon in the desktop bar, it does not restore any tab.
What am I making it wrong? I already set it to restore the tabs in its Preferences.
Best Answer
Closing the window is not the same as quitting the app.
Clicking the red X closes the window, telling Safari that you've done with the contents - leaving nothing for it to remember.
It's not clear from your question quite what you are selecting from the right click menu, but anything other than quit - or quitting after all windows are already closed, will do the same.
Note that, if you do forget & close the windows before quitting, that you can use History menu > restore all windows from last session to get them back again.