Avoid loosing changes to theme

Your content (data) is stored in the database. If you don’t update the content, it will remain unchanged.

Themes are mostly for data presentation (if there is no niche specialization on updating content). So, in the majority of cases, when you change the theme files, you don’t change the content itself.

To be sure you don’t break your content presentation consider to make the backup of your original theme and make your experiments on your theme copy. This way you’ll have the fallback in case of something goes wrong.