One of the most important challenges in wireless sensor networks is the issue of localisation. Furthermore, it is critical to monitor and evaluate the data gathered. With the aid of a collection of constructed nodes known as beacons, the localization technique can measure node location. For a variety of factors, such as upkeep, lifespan, and breakdown, the fixed density of these beacons may be increased or decreased. Because of its robustness, flexibility, and economic viability, a well-known technique for locating wireless sensor network nodes is the Distance Vector-Hop (DV-Hop) algorithm. As a result, researchers continue to look for ways to develop it. Based on Selective Opposition Class Topper optimization (SOCTO), we propose an enhanced DV-Hop localization algorithm, it also focuses through an optimized formulation to compute the average hop-size with weight of beacon nodes in order to reduce the localization error within estimated distance between the beacon and the dumb node, due to improved localization accuracy. The range-free localization algorithm in uniform multi-hop wireless sensor networks is the subject of recent study. In various implementation scenarios, the results of simulations show that our proposed algorithm performs admirably the DV-Hop technique and DV-Hop related techniques.