In intelligent transportation systems, Vehicular Ad Hoc Networks (VANETs) provide real-time vehicle-roadside infrastructure communication to improve traffic safety and efficiency. However, VANETs are vulnerable to sophisticated network assaults like DoS, Sybil attacks, and message tampering due to their mobility, lack of centralization, and changeable topology. Traditional IDSs fail to detect such threats without sacrificing vehicle privacy. A novel IDS system, the Distributed Adaptive Network Anomaly Guard (DynaGuard), leverages distributed machine learning via privacy-preserving federated learning to address these concerns. DynaGuard lets cars train local models using network traffic patterns, detect abnormalities in real time, and adjust threat levels using ensemble-based learning. To conclude, DynaGuard protects vehicle networks from emerging cyber threats and enables intelligent transportation systems with secure, dependable communications. In a simulated VANET dataset, DynaGuard outperforms typical IDS techniques with a 97.1% detection rate, 19% fewer false positives, and low communication cost.