How to keep my original data when I reinstall the software

I built an app using electron, and I used realm during the rendering process. I built an exe, installed it on my computer and used it, but after updating the software and reinstalling this software, the original data is lost. I would like to know how to reinstall the original data.Thanks