Advancing IoT Cybersecurity through AI and ML: A Comparative Study on Intrusion Detection and Privacy Protection | Synapse