Are both the terms synonyms, or do they have different meanings?
A temperament is what you get when you compromise the tuning of a keyboard or fretted string instrument to "fix" the out of tune intervals that result from tuning other intervals "purely" or "justly," that is, tuning the two pitches so a harmonic of one coincides with a harmonic of the other. A temperament is a kind of tuning system.
People often talk about tuning keyboards in "just intonation," but they tend to ignore the fact that doing so leaves the perfect fifth between the second and sixth degrees of the major scale rather far from a 3:2 ratio. Even tuning the a keyboard with only seven pitches of the diatonic scale is likely to require a temperament of some sort.
(Tuning a keyboard for melodic use only, such as the earliest organs, one does not need to worry about harmonic intervals, so there is little need for temperament; similarly, Pythagorean tuning does not need to be tempered in music that treats the third as a dissonance, such as late medieval polyphony.)
By contrast, consider an ensemble of singers, trombones, or fretless string instruments. They can basically tune all of their harmonic intervals pure, though this can require some melodic intervals to be wider or narrower than usual to prevent the pitch from drifting too far away from its starting point.
While this constitutes tempering the intervals, that is, modifying them from their expected sizes, it doesn't constitute a temperament. The main reason for this is that it lacks consistency, because some pitches will be slightly different in different parts of a piece, and the same interval might have a different size in different parts of a piece.
Most commonly, a temperament is a coherent set of frequencies for a fixed set of a relatively small number of pitches, usually twelve. This is a natural consequence of the origin of the concept in the tuning of keyboard instruments. "Tuning system" can refer to many different things, but in this context it is essentially a set of principles used to decide how to tune the pitches in a piece of music, or else it is a keyboard tuning (such as Pythagorean tuning) that does not have any tempered intervals.
It's a bit like "scale" and "mode": a "tuning system" is what you do to your notes, a "temperament" is a characterisation of what the resulting character as a whole is. You could also use "tuning system" to describe the process of getting to a temperament, namely what notes/strings you tune in what order and with what beatings in relation to other notes (like, a system for tuning the guitar, or less ephemerally an organ). There is some overlap with "intonation" (which makes sense for finishing pitch and possibly sound quality of flute holes or organ pipes or even doing the fretting for a guitar or lute or viol) too.
They are often used interchangeably, but they are technically different.
Tuning system is a broad term meaning any system of tuning an instrument.
Temperament is a set of adjustments (temperaments) to a tuning system to meet specific musical requirements.
For example, "just intonation" is a tuning system involving "pure" intervals. "Equal temperament" is a system of modifying just-intoned intervals to be of equal distance from each other, allowing for transposition to all keys. "Mean tone temperament" and "well temperament" are other systems of tempering just intonation.
These distinctions are further made clear in Wikipedia's Musical temperament article.