The sitemaps.org protocol describes an XML file of URLs. Each entry has a loc, and may have lastmod, changefreq and priority. Those three are hints. A crawler may ignore them. The file is how you say which addresses exist and which you care about. Search engines discover the file from robots.txt, from Search Console, or by fetching a conventional path. Nothing in the protocol sends a message at the moment you publish.
IndexNow is that message. The documentation says you host a key file on your host to prove you control it, then POST or GET the changed URLs to a participating engine. One POST can carry up to 10,000 URLs. HTTP 200 means the URL was submitted. HTTP 202 means it was received and key validation is still pending. 400 is a bad format, 403 is a key problem, 422 means the URLs do not belong to the host or the key does not match, and 429 means too many requests. None of those codes means the page was added to an index.
The two fail in different ways. A sitemap full of noindex URLs, redirects and yesterday’s date on every row teaches a crawler to ignore the file. An IndexNow ping of those same URLs repeats the mistake as a notification. A correct sitemap with no ping still works: the crawler finds it on its own schedule. A ping with no sitemap still works for the URLs you named, and leaves every other URL to be found from links. We keep one list. The sitemap is that list. The ping sends that list.
lastmod is not a ping either. It is the date on a row. If it changes when the page changes, and only then, a crawler that trusts dates can skip URLs that did not move. If every URL is stamped with today, the date is noise. Google’s helpful-content documentation treats changing dates to look fresh, without a real change, as a warning sign. IndexNow is how you say “this one changed” at publish time. lastmod is how the list records when it changed. They answer different questions.
If you want this done on your site, start with Technical SEO.