It depends. You can lose your data if it is stored on your old SIM card. However, you can avoid losing your data by creating a backup on your phone or iCloud.