A VPN does not stop ransomware, but technically it will make your device less vulnerable to malicious attacks as it encrypts your IP addresses, data, and traffic while browsing the internet.