root is the superuser, who can do anything on the system. sudo lets an authorized user run a command with root rights, with logging, without logging in as root. It is used case by case, following the principle of least privilege.
Example
sudo systemctl restart nginx