If you use any Sitemap XML validator out there, including submitting the sitemap to Google Search Console, you will see that the generated sitemaps by Hugo are 100% valid.
The purpose of this forum is not to educate you about general Web Development.
As noted in the Requesting Help guidelines (big pink banner at the top of this forum):
In the future please do some research before asking questions that have answers.