Clustering is considered one of the practical approaches for boosting the lifespan of the Wireless Sensor Networks (WSNs). It involves in gathering the sensor nodes into groups and elects the cluster heads (CHs) in each group. CHs gather the data from cluster members and transfer the aggregate information to Base Station (BS). However, the most significant obligation in WSN is to elect the optimal CH to enhance the network's lifespan. This paper proposes an optimal cluster head election framework in WSN. A novel hybrid technique selects the optimal CHs: an oppositional grey wolf optimization (OGWO) algorithm that collaborates with generic GWO and opposition-based learning techniques. The hybrid OGWO algorithm dynamically balances between intensification and diversification search process in electing optimal CHs. In addition, the parameters like energy, distance, node degree, and node centrality aid in selecting the optimal CHs in the network. This CHs selection framework improves the efficacy of the network capability and enhances the network lifespan. Further, the superiority of the proposed OGWO technique is validated based on the various impacts like energy, alive nodes, BS location, and several packet delivery aspects. Accordingly, the proposed OGWO technique provides a better network lifetime of ~ 20%, ~ 30% and ~ 45% compared with GWO, ABC and LEACH techniques.