しまったんだ

ended up doing

→ 仕舞う
phrase Uncommon #8,244
ended up doing Follows a verb's て-form. しまう can emphasize that an action was completed or happened regrettably; んだ adds an explanatory tone.
JA: 財布を忘れてしまったんだ。
EN: I ended up forgetting my wallet.

深く考えないでその仕事を引き受けてしまったんだ。

I took on the job without thinking it through.

うまいことを言ってみんなを連れていってしまったんだ

They talked everyone into going with them.

— 崖の上のポニョ (2008)

去年、君が手元にどれだけ金を持っているか、だいたい見当がついてしまったんだ。

Last year, I got a pretty good idea of how much money you had on hand.

ディズニーにケモナーにされてしまったんだ。

Disney turned me into a furry.

奇妙なことに、彼女は突然姿を消してしまったんだ。

Strangely, she suddenly disappeared.

契約にサインしてしまったんだ

I ended up signing the contract.

— Брат 2 (2000)

あの夏の日あの空の上で僕たちは世界の形を変えてしまったんだ

That summer day, up there in the sky, we changed the shape of the world.

— 天気の子 (2019)