Furthermore, the integration of energy harvesting with CR allows for the deployment of energy-efficient and long-lasting networks [52], which is particularly beneficial in remote or difficult-to-reach areas where traditional power sources and spectrum management are not feasible. CR also helps EH-WSNs in handling the security challenges posed by their energy-constrained nature [53]. Since these networks often operate in open, unprotected environments, they are highly vulnerable to attacks, including jamming and eavesdropping. In such scenarios, CR can be used to mitigate interference by quickly switching to alternate frequencies [54], thus minimizing the impact of malicious activities. These networks can thus be deployed in a variety of critical applications, such as environmental monitoring, healthcare, and disaster response, where both security and energy efficiency are paramount. In this paper, a comprehensive review of the cutting edge in the field of EH for WSNs is presented with an objective to provide scholars and practitioners with in-depth understanding of the existing scenario as well as future directions on this emerging subject. While its application in a WSN may appear new, the concept of EH is far from being so. This is mostly because a great number of sensors are being deployed, often too far from any maintenance center and some sort of power network, making battery replacement not feasible or unduly expensive. Conventional power sources have limited lifetime and dependability for WSNs [55], which makes them less viable for many critical deployments over a long term such as infrastructure management, security systems, and environmental monitoring. These trends have driven the research towards energy harvesting and an improvement in network security to cope with increasing demands for self-sufficient and long-lasting sustainable networks. The summary of the review work is as follows. Section 1 addresses the background and motivation behind EH-WSNs, focusing on the need for energy sustainability in sensor networks and the role of EH technologies. Section 2 explores various energy-harvesting techniques, including solar, vibration, and RF energy, detailing how these methods are applied to power sensor nodes in EH-WSNs. Section 3 discusses energy management strategies, emphasizing the importance of efficient energy storage and consumption algorithms to ensure the continuous operation of EH-WSNs. Section 4 examines the application of CR in wireless sensor networks, explaining how dynamic spectrum access can optimize energy and spectrum utilization in EH-WSNs. It also explores PLS techniques, focusing on their role in protecting communication from eavesdropping in EH-WSNs while ensuring energy efficiency. Section 5 reviews routing protocols designed for EH-WSNs, highlighting strategies for managing data transmission in energy-constrained networks. Section 6 identifies the key challenges and opportunities in EH-WSNs, including energy variability, spectrum sharing, and security concerns, and explores future trends in the field. Section 7 summarizes the key findings from the review, focusing on the synergies between EH, CR, and PLS in enhancing network performance. Section 8 concludes the review, emphasizing the need for further research and innovation to address the challenges and optimize the performance of EH-WSNs for real-world applications.