A. Ensure that you are logged into the game with a valid account (Google Play Games, Facebook, etc.) to save your progress online.
B. Regularly back up your game data using the built-in backup feature if available, or manually save your progress before closing the app.