If the validation works, please move to the second point.
2. Make sure you have cleared the cache and excluded your sitemap URLs from being cached then: Head over to WordPress Dashboard > Settings > Permalinks and hit the save button once. Go to WordPress Dashboard > Rank Math > Sitemap Settings and hit the save button once.
That should fix the issue.
If it doesn’t, please do let us know so we can look at this further.