Your sitemap tells search engines "these are the pages worth indexing." If some of those URLs now return 404, 500, or redirect somewhere else, you're sending crawlers to dead ends and wasting crawl budget. Search Console reports some of this, but late and only for URLs Google already tried.
A faster check: read every URL from the sitemap yourself and request each one. This post shows how to do that in one call, then keep only the rows that need fixing.
What counts as a sitemap problem
For every URL listed in a sitemap you want one of these answers:
200 : fine, nothing to do.
301/302/308 redirect : the sitemap should list the final URL, not the old one.
404/410 : the page is gone; remove it from the sitemap or restore it.
5xx, timeouts, DNS errors : the server is failing on a page you asked to have indexed.
The tricky parts are the sitemap side (nested sitemap indexes, .xml.gz files, sitemaps declared only in robots.txt ) and doing thousands of status requests politely.
One call: extract URLs and…