sitemap.xml is a file listing all the important pages on your site. It works like a table of contents: a search engine looks at it and immediately sees what to crawl and index, missing nothing.
The bigger the site, the more a sitemap matters. On a site with thousands of pages a robot may never reach deeply buried sections on its own. A sitemap leads it straight there. For a new site it also helps you get indexed faster - the robot does not have to guess the structure.
You list the sitemap address in robots.txt and add it to Google Search Console. After that the search engine checks it regularly and spots new and updated pages faster. Keep the sitemap current - deleted pages should not be in it.
A free 30-second audit shows whether everything is fine on your site.
Check your site for free