A sitemap is a very simple file that seldom has issues provided it is built correctly. Since we have no way of examining the patient (your sitemap) there is no way we can diagnose the problem.
Find what the structure of the sitemap is supposed to look like (Google et alia have several very good tutorials on building sitemaps) then compare yours to the required structure. Whatever the problem is will be VERY easy to find since sitemaps are so simple.
Here is a very simple example of a correct sitemap.
<urlset> <url> <loc> https://example.com/example/Anything/Anything.htm </loc> <lastmod>2021-01-02</lastmod> </url> <url> <loc> https://example.com/example/Something/Something.htm </loc> <lastmod>2021-01-03</lastmod> </url> <url> <loc> https://example.com/example/Nothing/Nothing.htm </loc> <lastmod>2021-01-09</lastmod> </url> </urlset>