In terms of a game’s “memory”, I remember Pokémon does some rather odd things.
It sorta started with Ruby and Sapphire’s Animal Crossing-esque sharing of data. In addition to various events, the game can, at times, prompt the player the input a phrase and the game will share to other players or occasionally play back this information to you. The simplest examples are being able to share a “trendy saying” or being interviewed by reporters and seeing the interview later on the in-game TV. Less obvious examples is hearing about another player trying but failing to catch a Pokémon, or winning the Pokémon League.
The games have remembered all sorts of things since, some of the information you can get via talking to certain NPCs. You can check what Pokémon you used to defeat each Gym Leader, for example, or see what memories your Pokémon have. One of the game’s endings even show each Gym Leader battle you had and the Pokémon you used to defeat them.
Ribbons do a similar thing, showcasing an individual Pokémon’s accomplishments along its journey.