linux isnt immune to viruses even though its not as bad as windows
what should i do to be safe if i have a safe browser, vm, but pirate and download risky things? i know its a vm but i still dont want to have to delete everything in the vm if something happens. also the malware doesnt go to the router and spread rigt???


Malware could go to the router and spread absolutely. However other devices firewalls should be pretty good at stopping that. Also I dont know how common that is for malware tbh
I think most common is phishing attacks, scammers, and then shady downloads.
Less common is probably dependency attacks, xss, and exploiting servers in the traditional way, and probably a bunch of other attack vectors.