how to save data so it doesn't get lost how?
For Android: periodically copy the save files somewhere, because when you update the game, Android deletes them.
For other systems, it is enough to back up the common save folder.
Windows: C:\Users\[USER]\AppData\Roaming\RenPy\TownOfMagic
MacOS: library/RenPy/TownOfMagic/
Linux: ~/.renpy/TownOfMagic
Android: Phone\Android\data\www.townofmagic.com\files\saves
You can try to periodically use the Ren'Py mechanism to transfer saves between your devices within the game itself (the button is on the load and save game pages, respectively). But this does not always work and not in all regions of the world. In fact, there are no other options. Maybe someday Android will stop deleting saves when updating the game.