Getting confused that how to code this download function in javascript

I host a static html file on netlify here is the url…

https://laughing-lewin-eb42f8.netlify.app/

How can I code these download function, because if I define the image url with https://cors-anywhere.herokuapp.com like… var url = 'https://cors-anywhere.herokuapp.com/https://c4.wallpaperflare.com/wallpaper/203/636/834/minimalism-landscape-digital-windows-11-hd-wallpaper-preview.jpg';
Then I’m successfully download the images but when I trying to open the image file it show that it appears that we don’t support this file format

And if I define the url without https://cors-anywhere.herokuapp.com like…var url = 'https://c4.wallpaperflare.com/wallpaper/203/636/834/minimalism-landscape-digital-windows-11-hd-wallpaper-preview.jpg';Then it’s throw CORS error Access Control Allow Origin error and onething that I did not access the server side to configure Access Control Allow Origin because I host this site
on platform like github page, netlify or google blogger so how can I do that….

Can any one please give any idea…….