What is the practice to generate random symmetric keys in React JS?

Context:- I’m building a React js app that is using crypto js library for encryption. i am using the hard coded keys for the process of encryption.

My question:- (I’m a crypto novice) is there a best practice for generating some-secret-key symmetric encryption? My plan is to generate this key randomly when the website boots for the first time and store it securely.

Please guide me.