In vehicular ad hoc networks (VANETs), due to the fast-moving mobile nodes, the topology changes frequently. This dynamically changing topology produces congestion and instability. To overcome this issue, privacy-preserving optimization-based cluster head selection (P2O-ACH) is proposed. One of the major drawbacks analyzed in the earlier cluster-based VANETs is that it creates a maximum number of clusters for communication that leads to an increase in energy consumption which reflects in a degradation of the performance. In this paper, enhanced rider optimization algorithm (ROA)-based CH selection is performed and that optimally selects the CH so that effective clusters are created. By analyzing this, the behavior of the bypass rider’s CH is chosen, and this forms the optimized clusters, and during the process of transmission, privacy-preserving mobility patterns are used to secure the network from all kinds of malfunctions which are performed by the new vehicle blending and migration process. The proposed P2O-ACH is simulated using NS-2, and for performance analysis, two scenarios are taken, which contain a varying number of vehicles and varying speeds. For a varying number of vehicles and speeds, the considered parameters are energy efficiency, energy consumption, network lifetime, packet delivery ratio, packet loss, network latency, network throughput, and routing overhead. From the results, it is understood that the proposed method performed better when compared with earlier work, such as GWO-CH, ACO-SCRS, and QMM-VANET.