The recency effect is part of the serial position effect and explains why items at the end of a list are remembered better, as they are still in short-term memory.
The effect you're referring to is known as the serial position effect, which is a term used in psychology. Specifically, you are asking about the recency effect, which suggests that items presented at the end of a list are remembered more easily and more frequently than items in the middle. This happens because the items at the end of the list are still held in short-term memory when recall is tested. The primacy effect, on the other hand, refers to our tendency to remember items at the beginning of a list better, as they have had more time to be encoded into long-term memory.
The recency effect in the serial position curve explains why people have a better memory of the most recently presented items.