One of the best methods to learn how English works is to observe what natives say in particular situations and what they mean by that. I'll give you a couple of situations with "forget doing" and "forget to do", and let's see if you can figure out the difference.
· I forgot locking the door.
· He forgot meeting her previously.
· I forgot seeing that movie before.
· He forgot telling me the secret.
· We’ll never forget visiting that temple.
· I forgot to take the garbage out.
· She forgot to call her mother yesterday.
· Did you forget to bring your keys?
· I’ll try not to forget to send you the information.
· Don’t forget to lock the door when you leave.
· Why did you forget to tell me?