If you log in using or bind a Facebook, Google Play, Game Center, Huawei or Apple (Only available for iOS 13+), your save data will not be lost.
When changing devices or reinstalling, all you need to do is log into the game with the relevant account to sync your latest saved data.
If you're using a guest account, the save data is likely to be lost and unrecoverable.