There are a few various methods that you can prevent getting spyware. The best way is to install an anti-virus program and anti-spyware program on your computer system. You can likewise prevent opening email attachments from unidentified senders, and clicking links from unknown websites. Furthermore, you should be cautious when downloading files from the internet, as some files may be contaminated with malware ransomware spyware (Stackoverflow published an article).