Hello Celine, this question is about the difference of the common usage between"to do"and"doing". In most cases, "to do sth"(infinite) refers to the things haven't done, and "doing" is for the things that are done already.
Therefore "forget to do sth"is used in the circumstance when someone is supposed to do a certain thing, but he/she failed to make it, whereas "forget doing sth" refers to the things someone did, but he/she forgot that he did so.
eg.I forgot to call him.(I didn't call him.)
I forgot calling him.(I called him, but I forgot that I called.)