In order to resolve this, we would first recommend clearing your site’s caching. If you are not sure how to clear your server caching, please speak with your host provider. Does clearing your caching from your caching plugin (W3TC, WP Supercache, etc), server (Varnish, LiteSpeed, or others), or CDN (such as Cloudflare, Amazon AWS, etc) resolve the issue?

The error ‘XML declaration allowed only at the start of the document’ is most often caused when another plugin or theme adds white space to the beginning of the sitemap file. You will need to view the source code of the sitemap_index.xml document in order to confirm this and we have additional information on this and how to resolve this error at the following link:

bu hata genellikle bir başka pluginin ya da temanın sitemap dosyasının başına boş bir alan eklemesinden dolayı oluşur. sitemap_index.xml dosyasının kaynak kodlarına bakın öyleyse düzeltin.
Bulduğum Olası Çözümler
Temanızın functions.php dosyasının son satırı boşsa orayı silip kaydedin.
Server Cache temizleyin.