Upgrading My Mac Os X without losing data

Normally, installing an updated version of MacOS should not cause any data loss. If you launch the installer app downloaded from the Mac App Store, then the new OS is installed leaving all your existing apps and data in place.

However, you should ALWAYS have a backup to mitigate the loss of any data. Things can go wrong; disks can fail; hardware can get stolen, catch fire, drenched with water, etc, etc.

There are a large number of posts here from people who have accidentally lost their data while trying to do something. These exist as warnings.

Files without a backup are waiting to be lost.