How to generate the sitemap manually from the command line?

Use the sys:cron:run magerun command:

vendor/n98/magerun2/bin/n98-magerun2 sys:cron:run sitemap_generate

See also: