This research delves into enhancing biosensing sensitivity by optimizing D-shaped optical fiber surface plasmon resonance (SPR) sensors employing Ag-Fe2O3 structures. By investigating the influence of different grating structures—rectangular, triangular, and elliptical—on sensor performance, a comprehensive analysis was conducted to ascertain the impact of these structural variations on sensitivity and detection precision. The study revealed that while the rectangular structure exhibited a sensitivity of 6.4 µm/RIU, the triangular structure outperformed with an impressive sensitivity of 7.2 µm/RIU. Moreover, the detection accuracy, quantified by the detection angle (DA), reached 15.7(µm)−1 for the triangular grating, surpassing the rectangular grating’s detection angle of 14.8(µm)−1. These results underscore the crucial role of structural design in enhancing sensor performance, with the triangular grating demonstrating superior sensitivity and detection precision in the context of plasmonic resonance. The extended detection range of refractive indices around 1.39 further expands the sensor’s applicability in diverse chemical and biomedical analyses. Notably, the sensor’s capability to detect various chemical solutions and diseases—including plasma, tuberculosis, white blood cells, and breast cancer cells—underscores its versatility and efficacy in dual-parameter detection. Through meticulous simulations and analysis, this study provides valuable insights into optimizing sensor sensitivity, detection accuracy, and application versatility, paving the way for advanced developments in biosensing technology with far-reaching implications for chemical and biomedical research.