Technically, it makes a record in the blockchain like this - "RIP/Gagarin/Yuri/Alekseyevich/." block #377110.
The main idea everyone can bring a flowers to the blockchain headstone. And in a few hundred years the people will see who were more popular - princess Diana or Queen Elizabeth II just counted how match the flowers there are.