To ensure your data is saved, you need to be logged into your Nintendo Account. Only users who are over 13 years old can create a Nintendo Account.
Even if you reinstall the application on your device, as long as you log in with the same Nintendo Account, your progress will be preserved.