What a sitemap is for
An XML sitemap lists the URLs you want search engines to find, with optional last modified dates. It does not guarantee indexing, but it helps new and deep pages get discovered faster.
A single sitemap can hold up to 50,000 URLs and 50 MB uncompressed. Bigger sites split them and list the parts in a sitemap index.
Common mistakes
Listing URLs on another host or protocol, listing pages that redirect or are noindex, and setting every lastmod to today. Only list canonical, indexable URLs, and use real last modified dates.
Questions
Where should my sitemap be?
Usually at /sitemap.xml, and listed in robots.txt with a Sitemap: line. Submit it in Google Search Console too.
Do changefreq and priority matter?
Google says it ignores them. lastmod is used when it is accurate.
Should noindex pages be in the sitemap?
No. List only pages you want indexed.
Does it check every URL in the sitemap?
It reads the sitemap and checks its structure and hosts; it does not fetch every listed page.