When you go in to the confessional, confess all of the sins that you can remember. And when you are done, you should say, like I do, “and for all of the sins I can’t remember.” Or there’s also another way to say it, you can look it up. But basically, the sins that you forgot to mention are forgiven. However, try to make a good examination of conscience before entering the confessional. Just make sure you do not intentionally omit sins, because if you intentionally do not confess a mortal sin in the confessional, then that is a mortal sin in itself. But if you truly just forgot to mention something and later remembered it, you’re forgiven.
Also, if you happen to forget to mention a mortal sin (though like I said, try to make a good examination beforehand) and you remember it later, you are forgiven, but it is a good rule of thumb to mention it in your next confession.