Cybersecurity focuses on preventing and detecting cyberattacks, while digital forensics focuses on cyber incident investigation.