What is the difference between siteUrl and baseUrl? What is the difference between siteUrl and baseUrl in Craft 3? Is there any?
When you take a look into Craft you'll see this

 /**
 * @var string|string[] The base URL to the site(s). If set, it will take precedence over the Base URL settings in Settings → Sites → [Site Name].
 *
 * This can be set to a string, which will override the primary site’s base URL only, or an array with site handles used as the keys.
 *
 * The URL(s) must begin with either `http://`, `https://`, or `//` (protocol-relative).
 */
public $siteUrl


So the baseUrl is what you insert in your site settings, the siteUrl can overwrite these values from your config

The Site.php (model) has a this function as well

/**
 * Overrides the base URL while keeping track of the original one.
 *
 * @param string $baseUrl
 *
 * @return void
 */
public function overrideBaseUrl(string $baseUrl)
{
    $this-&gt;originalBaseUrl = (string)$this-&gt;baseUrl;
    $this-&gt;baseUrl = rtrim($baseUrl, '/').'/';
}


which is called in the Site service

$site-&gt;overrideBaseUrl($generalConfig-&gt;siteUrl);