This work presents a numerical study of a multilayer optical biosensor based on distributed Bragg reflectors (DBRs) with a blood-filled cavity. The Transfer Matrix Method (TMM) was employed and simulated in MATLAB to analyze the resonant behavior over the wavelength range 780-810 nm. The analysis also considered the effects of temperature variation from 15 to 40 °C and changes in the silicon layer thickness from 20 to 200 nm. The results revealed a blue shift in the resonant wavelengths of the defect mode due to temperature variation, leading to a negative thermal sensitivity whose magnitude depends nonlinearly on the silicon layer thickness. In addition, electric field intensity distributions at resonance revealed stronger localization of the mode within the cavity for intermediate silicon layer thicknesses. This increases the interaction between light and matter and broadens the spectral shift range induced by temperature changes. Conversely, thick silicon layers redistribute optical energy in the Bragg mirrors, compensating for thermal drift with partial compensation occurring due to redistribution. The results show that the performance of resonance confinement and temperature response can be significantly enhanced through geometric tuning, demonstrating the potential application of this design as an optical biosensor for malaria-related blood diagnostics without requiring labels.