"No shady privacy policies or back doors for advertisers" proclaims the Firefox homepage, but that's no longer true in Firefox 128.
Less than a month after acquiring the AdTech company Anonym, Mozilla has added special software co-authored by Meta and built for the advertising industry directly to the latest release
A custom user.js might be a good base to work off of. For example https://github.com/yokoffing/Betterfox
But jumping ship might be your best bet. Forks like Librewolf are good or otherwise a privacy respecting Chromium browser can work well too.