Quick answer
Извини́те · Прости́те
izviníte / prostíte — small apology and serious apology
The options
Sorry for your loss
Мне о́чень жаль is also what you say when something bad happened to someone else — the English “I’m sorry” in the sympathy sense. Извини́те would be wrong there.
What you hear back
Typical mistakes
Я извиня́юсь.
Извини́те.
Widely considered poor style — it literally means “I excuse myself”.
Извини́те for someone’s bad news
Мне о́чень жаль.
Sympathy is a different phrase.
Check yourself
A friend tells you their grandmother died. What do you say?