Dark Reader is the best extention for this, pretty sure it's open sourced too!
Dark Background Light Text has worked better for me. Less breakage and slow-down.
It's been some time since I tried all of the available extensions though, so Dark Reader might have improved in these aspects since.
Dark reader for firefox
Try this search: https://addons.mozilla.org/en-US/firefox/search/?q=dark&type=extension
Usually addons will transform each page with a custom CSS to make it dark mode. If you are talking about the native dark mode of each website, then I don't think there is a simple answer to this. Because each website is solving this differently. So we rely on custom CSS to force parts of the website styling in a temporary manner, each time it is opened up.
Dark Mode for Firefox is decent.
It did break the Dropbox website for me though. Had to disable the extension to get the website to work.
There's also Midnight Lizard. It's more powerful, but more resource intensive so I wouldn't recommend on phones or older systems.
Firefox
A place to discuss the news and latest developments on the open-source browser Firefox