Upgrade extension files => setup:upgrade Deployment static content => setup:static-content:deploy Generate Classes => setup:di:compile
setup:upgrade use for :
= Upgrades the Magento application, DB data, and schema
= Generate the static file like images and CSS generated from LESS.
setup:di:compileuse for :
= Application code generation (factories, proxies, Plugins, and so on)
For more information you can check this one : https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-compiler.html