An XML sitemap, as the name suggests, is the map of your website in layman terms. It is technically defined as an XML file which is the combination or list of all pages or important pages of your website. You must add all important pages which you want to show up on Google Search Engine Result Page (SERP). XML sitemap is also known as the blueprint of your website to search engine bots and spider as it will tell those bots and spiders what are all the important pages that need to be crawled and indexed. An XML sitemap is a schema that encompasses your website's title, categories, content, reviews/comments, tags and more. Optimizing sitemaps can help you spend the crawl budget efficiently so that your website might rank quickly. Sitemaps are categorized under Technical SEO. It is highly recommended to understand the concepts of Technical SEO before start optimizing. Because even minor errors could have adverse effects on ranking. So you can take up the SEO course from best seo training institute in chennai which will teach all aspects of SEO. Or you can hire an SEO company to optimize the sitemap for your website.
There many online free tools with which you can create a sitemap your website with just a few clicks of the buttons. No matter what's the size of your website, how old is it, what CMS you're using and anything. You can just use those tools to get the list of available links on your website. Sometimes, these tools will add links that are not important or you don't want to show up on Google. So you will have those URLs by yourself with just using the Find & Replace option on the editor.
Also, there are many plugins like Yoast SEO which will create a sitemap for your website, if you're using CMS (Content Management System) like WordPress, Shopify, Joomla etc.