Why does the I am sorry phrase need a four word expression?
It causes me pain.
It's the same as the three word 'I am sorry', or more literally 'it gives me sorrow'.
Sentences in other languages will not always be able to be translated literally word for word. Get used to it. ;-)
It’s literal translation is different. ‘Es tut mir’ means ‘it does me’. Unsure about what ‘leid’ means but it’s close to ‘leider’ which means ‘unfortunately’.
It's complicated with literal translations:
the german verb in this case is "leid tun" (or "jemandem leid tun") and means in english "to feel sorry".
Closer than "leider" would be "das Leid" which means "sorrow" or "harm".