A wireless sensor network (WSN) uses uniformly deployed and positioned sensors to regularly send sensed data to a centralized station. Sinkhole attacks, in which a malicious node draws packets from other legitimate sensor devices and drops them, are the main danger to the WSN network layer and continue to be a difficult problem on wireless sensor networks. Security becomes a major issue since these networks have limited assets including less memory, less energy, and less transmission capacity. Additionally, given the dynamic context in which they are deployed, they are vulnerable to a variety of Denial of Service (DoS) assaults, including wormhole, sinkhole, and black hole attacks. The most dangerous routing attack at the network layer is known as a "sinkhole assault," which directs all network traffic onto a fake path by sending false information under the impression that it is the quickest one to the server. We explore sinkhole attacks to prevent them, and this work proposes a method of detection based on the redundancy process. Messages are transmitted across multiple paths to the suspicious nodes. Upon a thorough evaluation of the response, the attacked nodes are ultimately verified. Finally, a simulation is run to evaluate the method's efficacy. Furthermore, the simulation indicates that the strategy might be somewhat successful. Finally, it draws attention to difficulties and offers a prospective viewpoint for identifying sinkhole attacks.