When we wish to increase our memory then we should remove everything that is unnecessary from our lives.
We are not talking about sin because sin should be cut out anyway. We are talking about unnecessary things. For example, if you like to sit up late at night chatting, then the next day you can’t remember how many rakahs to pray in Fajr, the late night chatting should stop.
When we have too much going on in our head it makes us forget. Prophet Muhammad (PBUH) said one of the good signs of a good Muslim is that he leaves out what doesn’t concern him.
If it doesn’t concern you, cut it out. We are at an age today, where are concerned with everybody else’s life.
We need to be concerned about our own life, not everyone else.