Hi, this can happen if another plugin (or your theme) inserts some stuff that breaks the XML markup. It can even be a blank/empty line at the start of the markup.
You may be able to see when you view the source code in your browser with Ctrl+U (usually). Or if you can share a link to your sitemap, I can take a quick look for you.
Have you tried disabling the XML Sitemap Index option on Settings > Reading, and then checking the default WordPress sitemap on /wp-sitemap.xml? If that one is alright, the you may want to consider using the core sitemap…
If that is not an option for you, and if it is indeed just a blank line at the start, then the only way to find out where that is coming from, is disabling all other plugins, and maybe even switch to the default theme for a short while. Then check again and if it is gone, then switch back to your current theme and one by one enable every plugin again, each time checking if the issue reappears.
But if after disabling all and even with the default theme, the issue remains, then if is probably coming from your wp-config.php. Check it for an empty line before the opening <?php
tag, or if there is a closing ?>
tag at the end then remove that.