Context. The main sequence of quasars has emerged as a powerful tool for organizing the observational and physical characteristics of type-1 active galactic nuclei (AGNs). Aims. In this study, we present a comprehensive analysis of the metallicity of the gas in the broad-line region, incorporating both new data and previously published findings, to assess the presence of any trend along the main sequence. Methods. We performed a multicomponent analysis on the strongest ultraviolet (UV) and optical emission lines for a sample of 13 radio quiet quasars in the 0.009 ≤ z ≤ 0.472 redshift range, selected based on the availability of multiwavelength data. We employed UV and optical data obtained from the Hubble Space Telescope (mainly from the Cosmic Origins Spectrograph and Faint Object Spectrograph) and several ground-based observatories, respectively. We then measured ten diagnostic ratios and compared them with the prediction of CLOUDY photoionization simulations, identifying the closest photoionization solution to the data. Results. Our investigation reveals a consistent pattern along the main sequence. We observe a systematic progression in metallicity, ranging from subsolar values to metallicity levels several times higher than solar values. Conclusions. These findings underscore the fundamental role of metallicity in correlating with the main sequence of quasars. Extreme metallicity values, at least several dozen times the solar metallicity, are confirmed in low-z AGNs radiating at a high Eddington ratio, although the origin of the extreme enrichment remains open to debate.