Changing your domain does not delete your store data.
All store information (such as products, orders, and customers) is stored under the store ID.
Therefore, even if you change the primary domain, the store data used by existing customers will remain unaffected.
Please note that all data will be preserved as long as the store ID remains unchanged.