Spiders generally have relatively short lifespans, often around one to two years, but some species and individuals, especially females and certain tarantulas, can live for many years, even decades in captivity.
Spiders live a long time.

FactVerify
Source: factverify.com
Key Evidence
Most spiders live about two years, but some have been known to live up to 20 years in captivity.
terminix.comterminix.comHow Long Do Spiders Live? A Look at the Spider Life Cycle
Female spiders can live from two to more than 25 years.
carolinacountry.comcarolinacountry.comHow Long do Spiders Live?
Tarantulas can reach up to 30 years in captivity.
a-z-animals.coma-z-animals.comSpider Lifespan: How Long Do Spiders Live? - A-Z Animals
What the Evidence Shows
The statement 'Spiders live a long time' is partially accurate but requires context. Most common spiders live about one to two years, with many males dying shortly after mating. Female spiders tend to live longer than males, sometimes several years longer.
Certain species, such as tarantulas and some trapdoor spiders, can live exceptionally long lives, with documented cases of up to 20 or even 30 years in captivity. The lifespan varies widely depending on species, environment, and captivity conditions.
Therefore, while many spiders have short lifespans, it is true that some can live a long time relative to typical spider lifespans.