In order to not lose data, you need to take your data off your computer then transfer to Linux, e.g. on Google drive or on an external SSD, or keep it on a secondary drive on your computer (because the data on the drive with your os will be wiped)
But I don't recommend straight switching
Always try it out first, and there are multiple options
You could put it on a usb drive and run a live distribution, i.e. run the operating system off the usb drive rather than your drive, or use a virtual machine where you run an operating system inside your operating system (but if you have very little RAM this could be hard), or if you have a spare computer you can install it on there (although most people don't have a spare computer available)
If you end up wanting to switch but not 100% of your software or workflow works on Linux, one option could be to dual boot, which is when you run two operating systems on your computer - you can reboot to switch OS - but this requires more drive space
Another option is to switch to Linux and use windows in a virtual machine, but it may not always have the same performance (although using things like GPU passthrough can give you good performance as long as you have enough RAM and CPU cores, although some programs may not work, e.g. some games' Anti-Cheat software detects VMs)