Wireless Sensor Networks (WSNs) are fundamental components within the Internet of Things (IoT) scene, empowering information collection and transmission in different applications. This research papers on upgrading the security and vitality effectiveness of WSNs for ideal IoT usefulness. Novel strategies were created and assessed to address these vital perspectives. Security improvements included the usage of lightweight cryptographic calculations, intrusion detection systems (IDS), and secure directing conventions. These measures essentially reinforced organized strength against cyber dangers, with interruption discovery rates surpassing 95% and secure steering conventions accomplishing a strength score of over 97%. Vitality productivity optimizations enveloped communication convention improvements, information accumulation strategies, and energetic control administration methodologies. These procedures come about in outstanding decreases in vitality utilization, with optimized conventions diminishing vitality utilization by up to 30% and information conglomeration techniques yielding vitality reserve funds of up to 50%. Test assessments were conducted utilizing both simulation-based approaches and real-world organizations. Recreation comes about, obtained utilizing NS-3, showcasing the viability of the proposed strategies over different network topologies, activity designs, and attack scenarios. Real-world experimentation employing a WSN testbed approved the viable achievability and viability of the techniques. Comparative investigations with existing writing highlighted the oddity and importance of the commitments, checking considerable progressions in WSN security and vitality proficiency.