You have a choice of buying your tickets(s) either online or from one of the points of sale in Pietrasanta. You may prefer the online option if you are planning your evening(s) ahead of time or if you are simply not based in Pietrasanta.
And of course it’d guarantee your attendance as the cloister has a limited number of seats, in particular during these challenging times.