This paper proposes an enhanced surface plasmon resonance (SPR) sensor for the rapid and accurate detection of Escherichia coli (E. coli). The utilized structure of proposed sensor is silver (Ag)-tin disulfide ( \({SnS}_{2})\) -blue phosphorus (BlueP)/transition metaldichalcogenide (TMDC) heterostructure, which is deposited in between the prism and sensing medium. To analyze the sensor’s performance, the transfer matrix method (TMM) is used with help of the angular interrogation technique at a wavelength of 633 nm. Firstly, the optimization of the suitable prism and the thickness of Ag and \({SnS}_{2}\) are shown by analyzing the sensing performances for different prisms at different Ag and \({SnS}_{2}\) thicknesses. Secondly, the effectiveness of proposed sensor is explored by relating a better sensing performance with other structures that are designed by the considered layers. Thirdly, the detection of E. coli is executed with the influenced proposed structure, where it uses different BlueP/TDMC heterostructures. Results declare that the proposed sensor yields the best performance with a sensitivity of 252.47°/RIU, a quality factor of 100.0058 RIU⁻1, and a detection accuracy of 5.50032. Fourthly, the standard fabrication steps to reproduce the proposed sensor have been carry out at the end following by the comparative analysis with existing work.