するんじゃなかった

shouldn't have done it

→ 為る
phrase Uncommon #14,111
shouldn't have done it An informal expression of regret meaning that the speaker wishes they had not done something. The action being regretted is expressed with する, often referring to a previously mentioned activity or situation.
JA: こんなこと、するんじゃなかった。
EN: I shouldn't have done something like this.

結婚なんかするんじゃなかった

I never should have gotten married.

あんなに早起きするんじゃなかった

I shouldn't have gotten up that early.

昨日あんなに夜更かしするんじゃなかった

I shouldn't have stayed up so late last night.

徹夜するんじゃなかった

I shouldn't have stayed up all night.

お辞儀するんじゃなかったかな

Wasn't I supposed to bow?

— ブレット・トレイン (2022)