Keeping up with web standards, and dropping the advertising rubbish that's making them somehow atrophy users faster than they were before.
Otherwise, they'll be gone. Thunderbird has proven people are willing to donate millions if they know their money will go directly to the software. In 2022, Thunderbird collected ~6 million in donations (~20 million users) compared to Mozilla's ~9 million (from >200 million users)