After you have disabled Yoast and want to use the standard wp-sitemap.xml you may have problems.
It will not work and display straight away.
The error you receive maybe a 404, when loading /wp-sitemap.xml can be caused by a number of issues, including the permalinks or rewrite rules. I would 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
Add this to your functions file.
add_filter( ‘wp_sitemaps_enabled’, ‘__return_true’ );
This should fix it.