Almost everyone running tech businesses seems to assume that subscriptions or data capitalism are the only way to make any money these days. But I have paid for good software in the past and I know plenty of indie developers who still sell software like a product and do OK with that model. Copies of great software like Firefox could surely be sold - for actual money - to the kind of people who value its independence, privacy, and user focus. Offer free security updates for some reasonable period similar to an LTS release. The web moves fast enough that a lot of people will want to buy upgrades quite regularly anyway just for the new features.
Firefox appears to have close to 200M active users based on Mozilla's published data at https://data.firefox.com/dashboard/user-activity. If they could get 1/20 of those users to pay them an average of $10 per year - that's less than one month of a standard subscription to a major streaming service in most Western countries - then that's $100M/year in revenues. Based on the public financial statements that's on the same scale as their subscription and advertising revenue and their annual spend on development activities.
Another possibility might be to hide some of the developer resources behind some token paywall. Almost everyone I know who works in web dev uses MDN regularly. Firefox dev tools have a lot of useful things about them. Then maybe you can even keep the main browser free and get some revenue from devs - who are mostly going to file it as a business expense anyway and whose employers benefit greatly from the continued existence and maintenance of these resources.
Sure everyone would complain - just as everyone complains about paying a few bucks for a good text or graphics editor they use for hundreds or thousands of hours per year to make 1000x the asking price. But the value is obviously there to many people. I think a lot of Firefox users in particular would probably respect the transparent attempt to keep the lights on without compromising on the USPs that make Firefox attractive to those users in the first place.