Unlike e.g. MacOS, there is not just one setting.
1. Switching to Xfce will make life easier than struggling with whatever Raspberry pi OS is imposing (Lxsession or some such).
2. Go to: Settings -> Appearance -> choose Adwaita Dark theme
3. Go to: Settings -> QT5 settings -> GTK2 theme
4. Firefox: Choose the dark theme.
5. Ungoogled Chromium should also have a dark theme.