Ultraviolet (UV) observations of Type Ia supernovae (SNe Ia) are crucial for constraining the properties of their progenitor systems. Theoretical studies predicted that the UV spectra, which probe the outermost layers of a SN, should be sensitive to the metal content of the progenitor. Using the largest SN Ia UV (lambda<2900 A) spectroscopic sample obtained from Neil Gehrels Swift Observatory, we investigate the dependence of UV spectra on metallicity. For the first time, our results reveal a correlation (~2 sigma) between SN Ia UV flux and host-galaxy metallicities, with SNe in more metal-rich galaxies (which are likely to have higher progenitor metallicities) having lower UV flux level. We find that this metallicity effect is only significant at short wavelengths (lambda<2700 A), which agrees well with the theoretical predictions. We produce UV spectral templates for SNe Ia at peak brightness. With our sample, we could disentangle the effect of light-curve shape and metallicity on the UV spectra. We also examine the correlation between the UV spectra and SN luminosities as parameterised by Hubble residuals. However, we do not see a significant trend with Hubble residuals. This is probably due to the large uncertainties in SN distances, as the majority of our sample members are extremely nearby (redshift z<0.01). Future work with SNe discovered in the Hubble flow will be necessary to constrain a potential metallicity bias on SN Ia cosmology.