Node localization is critical for accessing diverse nodes that provide services in remote places. Single-anchor localization techniques suffer co-linearity, performing poorly. The reliable multiple anchor node selection method is computationally intensive and requires a lot of processing power and time to identify suitable anchor nodes. Node localization in wireless sensor networks (WSNs) is challenging due to the number and placement of anchors, as well as their communication capabilities. These senor nodes possess limited energy resources, which is a big concern in localization. In addition to convention optimization in WSNs, researchers have employed nature-inspired algorithms to localize unknown nodes in WSN. However, these methods take longer, require lots of processing power, and have higher localization error, with a greater number of beacon nodes and sensitivity to parameter selection affecting localization. This research employed a nature-inspired crow search algorithm (an improvement over other nature-inspired algorithms) for selecting the suitable number of anchor nodes from the population, reducing errors in localizing unknown nodes. Additionally, the weighted centroid method was proposed for identifying the exact location of an unknown node. This made the crow search weighted centroid localization (CS-WCL) algorithm a more trustworthy and efficient method for node localization in WSNs, with reduced average localization error (ALE) and energy consumption. CS-WCL outperformed WCL and distance vector (DV)-Hop, with a reduced ALE of 15% (from 32%) and varying communication radii from 20 m to 45 m. Also, the ALE against scalability was validated for CS-WCL against WCL and DV-Hop for a varying number of beacon nodes (from 3 to 2), reducing ALE to 2.59% (from 28.75%). Lastly, CS-WCL resulted in reduced energy consumption (from 120 mJ to 45 mJ) for varying network nodes from 30 to 300 against WCL and DV-Hop. Thus, CS-WCL outperformed other nature-inspired algorithms in node localization. These have been validated using MATLAB 2022b.