We report on the results of a numerical investigation into a phase transition material and hafnium (IV) oxide-based refractive index sensor with a wide spectral range, including both the visible and infrared regions of the electromagnetic spectrum. The sensor relies on hafnium (IV) oxide and a phase transition material (HfO2). Three layered versions of the proposed structure are studied; each configuration is built from alternating layers of HfO2, silica, Ge2Sb2Te5(GST), and silver. The three different arrangements have all been studied. The reflectance response of such multilayer structures is discussed in this manuscript for refractive indices ranging from 1 to 2.4. In addition, we have investigated how the varying heights of the materials affect the overall performance of the structure. Finally, we have supplied several formulae for resonating traces that may be used to calculate the sensing behaviour across a specific wavelength range and refractive index values. The corresponding equations are shown below. We have computed numerous equation traces throughout this inquiry to calculate the wavelength and refractive index values. Computational methods may be used to analyze the proposed structure, which might aid in creating biosensors for detecting a wide variety of biomolecules and biomarkers, such as saliva-cortisol, urine, glucose, cancerous and cancerous, and hemoglobin.