It’s flattering if a friend asks you to be an executor for their will. It shows that they trust you. (It probably also means that you will be inheriting something.)
But. Do you know what you are taking on?
It is a huge responsibility with legal strings attached. It may take up a year or more of your life.
When a person dies there are several practical things you have to do immediately, such as making sure their property is safe. In the longer term, the detailed paperwork takes over.