I do not know how to add highscore system for Godot, and I'm not sure if it is different for html5 games or the same.
If it is a small amount of data, you can use cookies. https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_web.html#using-cookies-for-data-persistence
But how do I use them?
I think you can use the normal functions and it will save to the correct folder in HTML5 (note, I have never tried this, but it seems reasonable): https://kidscancode.org/godot_recipes/basics/file_io/
It prints NULL when I try to load it.
I found this tutorial which looks interesting: https://coffeecoderblog.wordpress.com/2016/07/03/creating-a-save-system-in-godot/
Also make sure that security/cookie settings aren't being blocked. https://docs.godotengine.org/en/latest/tutorials/export/exporting_for_web.html#using-cookies-for-data-persistence