How can I upgrade my Windows 8.1 to 10 without losing my data?
If you plan to do a clean install of Windows 10, then the best option is to back up your files. If you plan to install Windows 10 over your current Windows 8, it is possible to keep your files. But make sure you do an officially licensed installation and that the update comes from Microsoft directly, so that you are given the option to save files.
When doing the official upgrade from Windows 8 / 8.1 to Windows 10, using the Windows application, and in general, when performing Windows 10 upgrades, neither %User files nor installed applications are lost. However, it is advisable to BACKUP everything before starting the upgrade process because the procedure is never 100% secure.