The 404 error you receive on your sitemap can be caused by a number of issues, including the permalinks or rewrite rules. We would first recommend to try resetting the permalink structure in WordPress which can be done by performing the following steps:
Login to WordPress
Go to Settings>Permalinks
Clicking ‘Save Changes’ without making any modifications
?We also have additional information regarding the sitemap files creating an error here: https://kb.yoast.com/kb/my-sitemap-index-is-giving-a-404-error-what-should-i-do/
If you continue to receive the error after resetting the permalinks, we would then also suggest adding a set of rewrite rules to your server and we have a guide on adding these for an Apache servers here: https://kb.yoast.com/kb/xml-sitemaps-apache/ and for Nginx servers here: https://kb.yoast.com/kb/xml-sitemaps-nginx/.