Sitemaps are a way to tell Google about pages on your site that they might not otherwise discover. In its simplest terms, a XML Sitemap usually called a Sitemap, with a capital S—is a list of the pages on your website.

Creating and submitting a Sitemap helps make sure that Google knows about
all the pages on your site, including URLs that may not be discoverable by
Google's normal crawling process.

The GoogleSitemap handle requests to 'sitemap.xml'
the other two classes are used to render the sitemap.

You can notify ("ping") Google about a changed sitemap
automatically whenever a new page is published or unpublished.
By default, Google is not notified, and will pick up your new
sitemap whenever the GoogleBot visits your website.

To Enable notification of Google after every publish set google_notification_enabled
to true in the googlesitemaps.yml config file.
This file is usually located in the _config folder of your project folder.
e.g mysite/_config/googlesitemaps.yml

Name: customgooglesitemaps
After: googlesitemaps
enabled: true
objects_per_sitemap: 1000
google_notification_enabled: true
use_show_in_search: true