The 12 astronauts that set their footprints on the moon have accomplished greater things in life.
The footprints which they set on the lunar surface will never be erased in centuries to come. Their footprint may last as long as the moon.
So how would this become possible?
The moon is not like earth. Hence, no erosion caused by water or wind exists on the moon.
The absence of erosion is because the moon has a tiny atmosphere and the entire water on its surface exist in a frozen icy state.
Footprints on the moon can last forever as there are no volcanic activities to wash away the prints.
However, your footprint may be wiped out under two conditions;
Firstly, the moon is literally exposed to the solar wind, which comes from the sun as charged particles.
Sometimes, the solar wind tends to scour the lunar surface following a slow process. During this slow process, your footprint may cease to exist.
Secondly, meteorites bombard the lunar surface from time to time. If a tiny space-rock from this bombardment eventually hits your footprint, it will surely wipe it out.
Let’s say the solar wind and meteorites never get closer to the footprint, then it will remain on the lunar surface forever.