sudo apt-get update
This command accesses each URL in the source list and reads the software listing, which is then saved on the local computer. The list of software that we see in the newly made Package manager is updated with the update command.
After the update, you may need to upgrade.
sudo apt-get upgrade
This command will compare the locally installed software with the software listed in the software list you just downloaded, and if you find that the installed software version is too low, you will be prompted to update it. If your software is the latest version, you will be prompted:
0 packages were upgraded, 0 new packages were installed, 0 packages were uninstalled, 0 packages were not upgraded.
In summary, update is the list of updates, and upgrade is the update software.
The role and difference of sudo update and sudo upgrade in Ubuntu