How can you stop sites from sending unwanted or 'enforced' downloads in Safari?
Solution 1:
The real solution is upgrading to Safari 13, but there does exist a solution on Safari 12 and earlier.
Open Safari Preferences, choose the General tab, and for the download location choose ‘ask for each download’.
With this option select, Safari will prompt for a file name and a location to save the file, which you can cancel so the download doesn't take place.
Solution 2:
Update Safari to its latest version. Apple updated it in macOS Catalina so that you need to allow downloads. Also, you can check in Safari Preferences in the website section. Note that auto run is deprecated so don’t worry if the download happens. Just navigate to it and delete it.