We apply the spectral energy distribution (SED) fitting code ProSpect to multiwavelength imaging for $sim$7,000 galaxies from the GAMA survey at $z<0.06$, in order to extract their star formation histories. We combine a parametric description of the star formation history with a closed-box evolution of metallicity where the present-day gas-phase metallicity of the galaxy is a free parameter. We show with this approach that we are able to recover the observationally determined cosmic star formation history (CSFH), an indication that stars are being formed in the correct epoch of the Universe, on average, for the manner in which we are conducting SED fitting. We also show the contribution to the CSFH of galaxies of different present-day visual morphologies, and stellar masses. Our analysis suggests that half of the mass in present-day elliptical galaxies was in place 11 Gyr ago. In other morphological types, the stellar mass formed later, up to 6 Gyr ago for present-day irregular galaxies. Similarly, the most massive galaxies in our sample were shown to have formed half their stellar mass by 11 Gyr ago, whereas the least massive galaxies reached this stage as late as 4 Gyr ago (the well-known effect of galaxy downsizing). Finally, our metallicity approach allows us to follow the average evolution in gas-phase metallicity for populations of galaxies, and extract the evolution of the cosmic metal mass density in stars and in gas, producing results in broad agreement with independent, higher-redshift observations of metal densities in the Universe.