This is the 8977th most frequent Japanese word.
沈ん
"沈ん" means "sunk" or "submerged."
沈んでしまいました means 'caused to sink,' describing an action leading to sinking.
重い荷物が船を沈んでしまいました。
The heavy cargo sank the ship.
沈んでいく means 'sinking' or 'going down,' referring to the sun disappearing beyond the horizon.
太陽が沈んでいく様子が美しいです。
The sight of the sun setting is beautiful.
沈んでいました refers to 'being sunk,' often used metaphorically to describe a feeling or state.