Whereas the XML Sitemap should dynamically update after any modification to it, if the site or server is caching the sitemap this can cause it to not update right away. We also have additional information on this at the following link: https://kb.yoast.com/kb/sitemap-does-not-update/. If you are not seeing the sitemap as updated, we would recommend checking your caching settings and to ensure that the sitemap is being excluded from the cache.
If you are still experiencing an issue with the sitemap not updating after checking your caching settings, you can also force a cache reset by temporarily disabling the sitemap feature, and then re-enabling. To do so please perform the following steps:
?In WordPress go to SEO>General>Features
?For ‘XML Sitemaps’ Toggle the switch to ‘Disabled.’
??Click ‘Save Changes.’
?Toggle the switch back to ‘Enabled.’
?Click ‘Save Changes.’
?We also have a guide on how to enable/disable XML Sitemaps here: https://kb.yoast.com/kb/enable-xml-sitemaps-in-the-wordpress-seo-plugin/