I have always just used a dictionary, placed whatever I want to save into it, using a key name I'll remember (like save_file["high_scores"] = [100, 50, 25]) and then used to_json and parse_json. I'm not sure if it is the best way by any means, but it's worked nicely for me. Then I just save and load the json using a File class, more or less following the tutorial from the documentation on saving games.
In theory, you may be able to save a class to a file using file.store_var, which I think tries to convert whatever variable you pass into binary, but I have only used it for saving input mappings, and I had a few problems getting things working, so yeah... Millage may vary.
I have no idea on what the best way is though. Anymore I only use a dictionary for saving in Godot, but there is likely better ways to do it, I just don't know of them :lol: