Hello @nht48823
You should take a backup of your database and your code, and then try to upgrade Magento version with existing database and code.
If you are looking forward to server transfer with Magento Upgrade then I suggest to import your database in a new server and code also then try to upgrade your Magento version.
If you do like this then you will not lose your customer data, order data, and catalog data.
If you like my answer then click on Kudos
If this helps you then click on Accept as Solution .