Each astronaut had their own mission.
Buzz was the lunar module pilot taking charge of the lunar module on its descent to the moon. Michael Collins was the Command Module pilot who commanded the module that did not descend to the moon’s surface but remained in orbit around it. Neil Armstrong, of course, was the captain.
Both Buzz Aldrin and Neil Armstrong had a schedule of tasks to do when on the surface including gathering rocks, and setting up experiments and equipment, many of which are still providing data today. All of these tasks were pre-arranged of course and pre-distributed between them so that both Neil and Buzz could complete their mission like clockwork, as they only had a set amount of time available on the surface(becauuse of the life support systems limited useful time, and in order to make a rendezvous with the command/service module on their return) and so any time had to be used wisely and without waste.
Although Buzz Aldrin is the second man on the moon, he is the first one hold a religious ceremony on the moon.
The famous footprint on the moon is also belongs to Buzz Aldrin.