First, it is known that it suffices to look at odd prime numbers $ n $

Grief has shown that when $ p $ divides the counters none of the Bernoulli numbers $ B_2, B_4, ldots, B_ {p-3} $ then Fermat's last sentence applies to $ n = p $, Such primes are called regular. Vandiver specified a criterion that deals with irregular prime numbers. The criterion is somewhat complicated and is given in Section 4 of Wagstaff, The Irregular Prime Numbers to 125000.

An integer must be specified for the criterion $ t $ that satisfies some property. Wagstaff indicates this in practice $ t = 2 $ always works, but a priori we can not guarantee that *any* value of $ t $ works; and even if no value of $ t $ works, but that does not mean that Fermat's last sentence applies. So the criterion is sufficient, but not known to be necessary, and also a good event $ t $ exists, it is not clear how to find it. As stated above, but in practice $ t = 2 $ always works.

The work you describe, which proves Fermat's last sentence for larger primes, probably uses the same framework. You can consult Buhler, Crandall, Ernvall and Metsänkylä, Irregular Primes and Cyclotomic Fields up to four million.