How to Stop Creating taxonomies in Sitemap

Taxonomies

Stop indexing your website’s taxonomies (category, post-tag, post-format/type) without using any plugins. Just paste given code in your functions.php file.

How to Stop indexing taxonomies via code

add_filter(
'wp_sitemaps_taxonomies',
function( $taxonomies ) {
unset( $taxonomies['post_tag'] );
unset( $taxonomies['post_format'] );
unset( $taxonomies['category'] );
return $taxonomies;
}
);

Then SAVE functions.php file after paste this code.