N4
ごとに
Each, Every
失敗をする経験は無駄ではありません。失敗をするごとに上達します。
Failing is not a pointless experience. Every time you fail, you improve.
Explanation
「ごとに」 means 'every …': something repeats at an even interval, without skipping.
「5分ごとにバスが出る」 (A bus leaves every 5 minutes). It can follow an amount, a noun or a dictionary-form verb.
Mixed up with
「1日ごとに」 means every day; 「1日おきに」 means every other day.
「~たびに」 stresses that every time the first thing happens, the second always follows, often a feeling: 「この歌を聞くたびに、故郷を思い出す」 (Every time I hear this song, I think of home).
「~ごとに」 stresses a regular interval.