This is a well-known ‘false friend’ between English and Spanish.
A commitment (“un compromiso”) = dedication to a cause or activity
In That’s English! we have a commitment to providing quality education.
A commitment = a promise
The government has made a commitment to cut taxes.
However, engagement («compromiso») = a formal agreement to get married
The singer announced her engagement on Facebook.
Compromise (“acuerdo mutuo”) = mutual or negotiated agreement
The employers’ association and the trade unions have reached a compromise on salary increases.
You’ll find more ‘false friends’ in the podcast of the same name in this app.