Actually I'm betting on the more knowledgeable to point out that browsers signal light/dark theme preferences automatically, without cookies.
https://drafts.csswg.org/mediaqueries-5/#prefers-color-schem...
https://drafts.csswg.org/mediaqueries-5/#prefers-color-schem...