‘Remember’ is a confusing verb because learners get confused with infinitives and gerunds (~ing verbs behaving as nouns).
Remember + noun phrase
The easiest way of using ‘remember’ is with nouns or noun phrases.
I remember you.
I remember the time we went to the zoo.
Remember + infinitive
When an infinitive follows remember it refers to an uncompleted action (or an action not yet begun).
I must remember to post that letter tomorrow.
Did you remember to buy milk?
Remember + gerund
This refers to a completed action in one’s memory.
I can’t remember locking the door. I hope I did it.
I remember visiting Spain every time I drink sangria.
You can also use the present perfect after ‘remember’ by using ‘having’ followed by the participle form of the main verb.
I remember having sent the letter because I sent my mother’s birthday card at the same time.
Do you remember having read the play at school we went to the theater to watch Blood Brothers?