I went to the supermarket to buy eggs, but I started looking at other things, then I forgot to buy my eggs.
この場合、次のような言い方ができますよ。
ーI went to the supermarket to buy eggs, but I started looking at other things, then I forgot to buy my eggs.
「卵を買いにスーパーに行ったのに、他のものを見始めて、卵を買い忘れた」
to go to the supermarket to buy eggs「卵を買いにスーパーに行く」
to forget to buy me eggs「卵を買い忘れる」
ご参考まで!