How to make Firefox warn on quit even if only one tab exist?
I may have misinterpreted the question in the previous answer. I'll leave it in place in case it's helpful to others landing here.
If you just want to get a warning when you try to quit with only one tab open, Firefox won't do that, unfortunately. It only warns if multiple tabs are open, regardless of warning settings.
If you accidentally quit with just one open tab, you would need to restore it from History
in the next session.