How do i store data for HTML for file://

so I wanted to store a cookie for light mode and dark mode inside a html file in file://, NOT a webpage. file:// path, not a webpage

but then I learnt that cookies don’t actually work on file:// (or at least on chrome).
so I googled and learnt about local storage, but that too does not work….

so I wanted to know is there any other way of storing data even on a file:// path?

thank you