Should I be saving my data this way?

When having leaderstat data that is supposed to be saved, it is common to set the leaderstat value to the loaded data when the player joins, and then save the leaderstat value when the player leaves, however this is in my opinion not very reliable, because if the data load fails, leaving the leaderstat value at 0, it will completely reset the data.
Instead, I am changing the leaderstats and the saved value separately, every time the player loses or gains leaderstat points, it updates the leaderstat value and also changes the saved data. So I am never actually saving what is in the player’s leaderstats.
This way, theoretically, even if the player’s data fails to load, and the leaderstats value is set to 0, the value that’s saved in a datastore will still be right.

Is this a good approach, and what could cause data loss when doing it my way?

I’d recommend you use 2 different datastores to store your leaderstats.

1 That saves constantly, and that loads your leaderstats once you join.
And the other one that saves when you join, leave, etc… And that will attempt to load if your other datastore was set to 0 once you joined the game.

You could also use a third party API that saves your leaderstats there.

Or you could just use Datastore2 or loleris playerservice for your leaderstats.

Hmm, I have read so much about DataStore security and stuff, and every post ends with “use DataStore2 or ProfileService”, I guess I have some rewriting to do…