The document presents a novel weighted clustering approach to enhance the lifetime and reliability of wireless sensor networks (WSNs) by optimizing energy usage through dynamic selection of cluster heads based on multiple node attributes. The method aims to utilize all available energy resources effectively, thus preventing network failure due to energy depletion. Performance evaluations using simulation demonstrate that the proposed technique offers significant improvements over traditional clustering methods in terms of packet delivery ratio, end-to-end delay, throughput, and energy consumption.