umsonst
free
Without having to pay for it; free of charge.
Der Eintritt ins Museum ist heute für alle Besucher umsonst.
Admission to the museum is free for all visitors today.

free / in vain
Loading your saved state.
free
Without having to pay for it; free of charge.
Der Eintritt ins Museum ist heute für alle Besucher umsonst.
Admission to the museum is free for all visitors today.

'Umsonst' (free / in vain) has two main meanings. The context makes clear what is meant: Is it about money and payment (free of charge), or about a missing result (in vain)?
Der Kaffee im Büro ist umsonst.
The coffee at the office is free.
In the meaning of 'kostenlos' (free of charge), 'umsonst' (free) often appears with verbs like 'sein' (to be), 'bekommen' (to get), or 'mitnehmen' (to take along). It is usually about products or services.
Die Beratung beim Anwalt war zum Glück umsonst.
Luckily, the consultation with the lawyer was free.
In the meaning of 'vergeblich' (in vain), 'umsonst' (in vain) describes an action without success. It is often combined with verbs like 'arbeiten' (to work), 'lernen' (to study), 'warten' (to wait), or 'sich Sorgen machen' (to worry).
Sie hat für die Prüfung gelernt, aber die ganze Mühe war umsonst.
She studied for the exam, but all the effort was in vain.
free
'frei' and 'umsonst' can both mean that you do not have to pay anything. 'umsonst' is very typical for this in everyday language: 'Der Eintritt ist umsonst' (admission is free). In this meaning, 'frei' is often used in fixed or shorter expressions such as 'Eintritt frei' (free admission) or 'freie Fahrt' (free travel / clear passage). Learners may confuse the words because both have to do with 'kostenlos' (free of charge). The important point is: 'umsonst' can also mean 'in vain', but 'frei' cannot. In addition, 'frei' has many other meanings, for example 'not occupied' or 'not imprisoned'.

Die Sprach-App ist heute umsonst, deshalb lade ich sie gleich herunter.
The language app is free today, so I am downloading it right away.
Am Sonntag ist der Eintritt ins Museum frei.
On Sunday, admission to the museum is free.