Chenge url with cloudflare workers

I use an old sitemap on my website that uses my old website link. I’m going to redirect the links to this sitemap to my new site address. The current sitemap format is as follows:

Based on the reviews I found that this can be done with the workers feature in Cloudflare, I even got resources but I didn’t succeed.
Source address

does anyone know too? I also want to know because I experienced the same thing