Advice for a good sitemap structure

Who can me explain sitemaps? I am interested in the more complexed structure.

For example: on the homepage I have hyperlink to a page with categories A category can have a subcategory or a product.

The url structure look like this

  • Level 0: https://www.example.com/
  • Level 1: https://www.example.com/categories
  • Level 2: https://www.example.com/categories/subcategories
  • Level 2: https://www.example.com/categories/product1 And so one.

What is a good structure for the sitemap?

I know the structure of a simple sitemap. But it are many urls…

Do I create an index sitemap with and split up everything like a sitemap for the homepage One sitemap for the categories and one for the products?