Perovskite solar cells are considered to be one of the most promising solar cell designs in terms of photovoltaic efficiency. However, their practical deployment is strongly affected by their short lifetimes, mostly caused by environmental conditions and UV degradation. In this contribution, we present a metasurface made of silver nanoparticles used as a UV filter on a perovskite solar cell. The UV-blocking layer was fabricated and morphologically and compositionally analyzed. Its optical response, in terms of optical transmission, was also experimentally measured. These results were compared with simulations made through the use of a well-proven computational electromagnetism model. After analyzing the discrepancies between the experimental and simulated results and checking those obtained from electron beam microscopy and electron dispersion spectroscopy, we could see that a residue from fabrication, sodium citrate, strongly modified the optical response of the system, generating a redshift of about 50 nm. Then, we proposed and simulated the optical behavior of core–shell nanoparticles made of silver and silica. The calculated spectral absorption at the active perovskite layer shows how the appropriate selection of the geometrical parameters of these core–shell particles is able to tune the absorption at the active layer by removing a significant portion of the UV band and reducing the absorption of the active layer from 90% to 5% at a resonance wavelength of 403 nm.