Number 1 piece of advice I have for that particular issue:
Never ever ever visit a torrent tracker site without an ad blocker enabled. The malware you’re talking about is almost certainly from a malicious “ad” masquerading as a download button.
Get uBlock Origin and leave it on any time you’re visiting a site that offers legally-dubious content. Because those kind of sites aren’t going to be doing much vetting of who they’re selling their ad space to as long as the checks clear.