How do I make this theme remain stable if the page is refreshed?

I want advice

I have html css javascript code and I want a function or solution that when the user refreshes the page the theme stays the same.

I want a simple solution because I am a beginner in this field

Thank you.