It is advisable to use a persistent database, especially for something like a comment system.
Cookies and localStorage store data that is only visible to a particular browser, and they’re not visible to other users, which is is not something you would want for a comment system. Because in a comment system, you should be able to see comments by everyone and not just yourself (unless you want some self-motivation ). Also, cookies and localStorage can get cleared when you clear your browser cache. Therefore I conclude, cookies and localStorage are not suitable places to store data.
there’s no way you will be able to view user submitted content, unless you send the data to somewhere everyone can access. If you want to keep your site static just rely on a external service or create a comment box that stores in somewhere decenteralized like ipfs