Sumi-masen and Gomen-nasai are used as the expression of apology in Japanese.
“Sumi-masen” is useful word for many different cases while “Gomen-nasai” is used only for apology. When you want to apologize, saying “Gomen-nasai” is better and avoids misunderstanding.