If you accidentally close a tab in Firefox, there are 2 ways you can bring it back:
1.Right-click on the tab bar, then click "Undo Close Tab". You can repeat this step if you're looking for a tab you closed a while back in the same session.
2. If you're looking for a tab you closed a while ago (but in the same browser session), check Firefox's History menu for Recently Closed Tabs.