I've recently generated a sitemap.xml for my website to help with its visibility on search engines. With this in mind, I have a specific concern about the structure of the URLs listed within the sitemap. If I list URLs using the format https://example.com (without www), will this particular format have any implications on my website's traffic, its ability to be crawled efficiently by search engines, and its subsequent indexing? I'm keen to understand if the structure of the URLs in the sitemap can impact these aspects and if there are any best practices I should be following.
Whether or not you include the www in the URLs is not important. It won't affect how well or easily Google indexes your site. What does matter is consistency.
Pick one URL format and stick to it. All internal links, canonical URLs, and sitemaps should use that URL format.
Best practice is to redirect traffic from one format to the other, so all https://www.example.com URLs should redirect to https://example.com equivalents, for example (or vice versa, depending on which you prefer).
The reason for this is that if both variants of the URLs are indexed, Google will see them as distinct URLs with duplicate content. This isn't necessarily problematic (if you have proper canonical URLs defined), but it's not ideal. Stick to the one URL structure improves your chances of good SEO performance.