With the reach of Google, Firefox had to be that much better to keep up, like it was compared to any version of IE. Unfortunately, Firefox kind of remained the same while Chrome became better and better.
In hindsight, they could have done what Opera did. But then they didn't. I don't think they did anything particularly wrong. Firefox just aged beyond its usefulness and will die, just because it's not needed anymore.
I see Brave as the spiritual successor of Firefox. Just like Firefox challenged the then status quo and made way for better browsers to come, Brave is challenging the current status quo Chrome and Google's business model at the same time.