VPNs can protect you from malware injection due to their highly effective encryption, but some go the extra mile and provide malware blockers that block malicious websites with the DNS level, like CyberGhost does (read https://usagevpn.com/vpn/how-to-use-a-vpn-for-cheaper-flights/