The transformative role of AI in enhancing cybersecurity measures