Although MIM structures have been studied for solar thermal applications for decades, the multilayer MI-MIM structure is the subject of this study's investigation for batter absorption. In order to identify an effective solar absorber, two configurations Gold-MgF2-Gold (GMGSA) and Gold-MgF2-Gold-MgF2-Gold (GMGMGSA) are examined in this work. By using machine learning approaches, this research was able to get an MSE of 2.8091 × 10−5 and an R2 value of 0.998836. The optical response and parameter optimization analysis have been examined in this work in the wavelength range of 0.4 μm–1.6 μm. When exposed to AM 1.5 spectrum radiation, the GMGMGSA absorbs 93.10 % of the radiation, compared to 88.30 % for the single-layer GMGSA. Furthermore, both structures show steady absorption that is independent of polarization up to a 70° incidence angle. The aforementioned discoveries render the structure a plausible contender for solar thermal uses, including battery-integrated photovoltaic (BIPV), commercial solar power (CSP), and solar water heating. This might lead to a future where energy is more sustainably produced.