There's such a thing called 'scareware'

Scareware is a type of malware attack that claims to have detected a virus or other issue on a device and directs the user to download or buy malicious software to resolve the problem. Generally speaking, scareware is the gateway to a more intricate cyberattack and not an attack in and of itself

Some scareware attempts to mimic trusted sources like Google to fool you into clicking or downloading.