A WordPress sitemap is an XML-formatted website file that details all the URLs a user wants search engines to take into consideration. Having a website that is organized and easily navigated by search engines is a key part of search engine optimization. XML sitemaps provide search engine crawlers with extra information like when the page last underwent an update. Users can create their own XML sitemaps by utilizing special plugins, though the default version included with WordPress is limited and needs to be updated whenever a page is published or changed. Though XML sitemaps are not required, they are seen as an essential SEO-related action and crucial for successful crawability. Yoast SEO is the most widespread all-inclusive SEO module for WordPress. The XML Sitemaps plugin is a complimentary and easy choice for creating an XML sitemap for WordPress. It also signals search engines when new pages have been created or amended. The plugin also splits up sizable sitemaps into multiple small ones (like a page sitmap, a post sitemapping, a category sitemapp, etc.). It eradicates "noindex" pages from the sitemapped automatically (If the page isn't desired to be indicated by Google, then it has no reason to be included in a sitemat.). Utilize Semrush's site audit tool to identify any errors and categorize them by priority on your website. Submitting your sitemap to Google can speed up the process of the discovery and crawling of your website. If you would like to gain more insight into the technical health of your website, our guide on performing a technical SEO audit is a great resource. The audit tool assists in setting up your sitemaps and also indicates what errors you have and what improvements need to be made. Make sure to submit your website to Google search console to help with setting up search engine crawlers such as Semrush. There are some great, no-cost WordPress Sitemap plugins for WordPress. Having a Sitemap is not mandatory for SEO, but is usually considered a good practice. You can either use a comprehensive plugin (eg. Yoast SEO, All in One SEO, or Rank Math) or a plugin tailored specifically for XML Sitemaps. If you ever notice any problems from Search Console, just follow the instructions to resolve them. To view the URL of your XML sitemap, just add "/sitemap.xml" to the end of your domain.
(source: https://www.semrush.com/blog/wordpress-sitemap)