I prefer the easy way
An XML sitemap helps ensure that search engines index your website’s content. An XML sitemap is a file that contains a list of all the pages on your website. This list makes it easy for search engines to find and index your website’s content. I have a WordPress website, and I use a Plugin.
Here’s a short video to learn more about this easy way to add a Sitemap for your WordPress Website.
One of the features of this plugin is that it automatically generates an XML sitemap for my website. This is a great feature because it means I don’t have to worry about creating and submitting a sitemap to search engines.