User preference can also vary strongly with device or display.
Dark mode can be preferable on an emissive display. I don't generally prefer it, though there are some sites using a darker display mode (Mastodon's web client comes to mind) which I prefer to their light modes ...
... unless I happen to be visiting on my e-ink device. That's 1) not emissive (it is visible under reflected light), and 2) display quality is far superior in dark-on-light than light-on-dark mode.
Keep in mind that I might be useing that device on its own (it's effectively an Android tablet) ... or in its mode as an additional display alongside an existing emissive screen. Which means that on the same computer, using the same Web browser, I could have a preference for either a light or a dark mode.
I've been noting several sites which (despite no "prefers-dark" browser setting) default to a dark mode. ArsTechnica and Nitter both come to mind. (Both offer a toggle to a light mode).
Mastodon is configurable when logged in, but when visiting instances unauthenticated, both defaults to and doesn't provide an alternative for dark mode.
Then there are the sites which present various non-black-on-non-white colour schemes, which includes Hacker News. If these are relying on colour to differentiate foreground text from display background, it fails entirely. At best I get a palette of greys. My e-ink device delivers a 16-shade greyscale colour depth, and the result is at best difficult to read, if not entirely unreadable.
Presumptions about colour, colour support, and user preferences are ... risky.
Incidentally: this is one domain in which terminal-based applications shine. I set my terminal to the font face, size, and colour preferences I want ... and all applications follow those. If there's tuning required (the w3m Web browser is a case in point), that application can be set once, and all uses inherit the relevant pallete.
Web design isn't the solution. Web design is the problem.