Ctrl+Shift+T will undo your recent tab closures in reverse order. The tabs maintain their history as well.
I am very surprised at how many people in here don’t seem to know that. I learned about Ctrl+Shift+T before I learned about Ctrl+W. I was using the middle mouse button on a tab to close tabs before then.