A zero-day attack begins with a hacker discovering a zero-day vulnerability, which is an error in code or software that the target has yet to discover. The attacker then works on a zero-day exploit, a method of attack, that they can use to take advantage of the existing vulnerability.
https://www.fortinet.com/resources/cyberglossary/zero-day-attack

