Ransomware is often spread through phishing emails that contain malicious attachments or through drive-by downloading. Drive-by downloading occurs when a user unknowingly visits an infected website and then malware is downloaded and installed without the user's knowledge.
An av-solution can assist you to keep your device secure, but it cannot help where users do not use common computer hygiene, that means not clicking inside e-mails, keeping all software up to date, not performing suspicious downloads.
There are no complete solutions to all of the end-user's problems. What you click is your own responsibility to a certain extent. When protection means not clicking links inside e-mails, do not do so or pre-scan that suspicious link. Look before you leap.
Installing an (any) av-solution does not mean, you are completely out of harm's way you and you can lean back. That was never in the bargain, still a lot of end-users have such false expectations and when a zero-day or new ransomware befalls them, they blame their av-solution. Malware often enters through curiosity killing the proverbial animal.
polonus