Use a fork of Firefox (librewolf), or a different open source browser
even if you modify Firefox to remove all telemetry, Mozilla are bad actors, and will update to add new telemetry like Anonym or Cliqz by default after an update. Unless you really trust your package maintainer, use a fork or a different browser
Disable javascript everywhere, or use a browser without javascript, whenever possible
trying to defend against fingerprinting with javascript enabled is futile, even things like your number of cpu threads (navigator.hardwareConcurrency), list of fonts, webgl support, supported codecs, browser permissions, and variations in canvas rendering can be used in fingerprinting
tor browser is the only project I know of that can come close to avoiding fingerprinting with javascript, but even then you’re advised to avoid using javascript with tor browser
use 3rd party clients for things like youtube that would normally need javascript