WordPress started pushing own sitemaps after their Version 5.5 release. This is a wonderful feature which provides effortless sitemap generation. Works great for sites where all the pages and posts needs indexing. The default sitemap can then be submitted to the search engines and periodically sitemap gets updated as and when there is an update in site.
However, if the wordpress site is a complex one where lots of custom post types are present and not all requires indexing. The default sitemaps can cause harm instead of any benefit. To resolve this, we can disable the wordpress core sitemaps.
To do the same we can use the inbuilt hook like this.
add_filter( 'wp_sitemaps_enabled', '__return_false' );
This will turn off the wordpress’ default sitemaps.