Boston Logan International Airport (BOS) & Rhode Island T.F. Green International Airport (PVD) are both a 1-hour drive from Sandwich. Keep in mind summer traffic!
It's not essential, but we do recommend renting a car for easier flexibility. All major car rental companies operate out of BOS and PVD.
From BOS, use the Plymouth & Brockton bus ~$35 one-way which runs at all hours. See the schedule here. Drop off at Sagamore (Bourne) Park & Ride. From there, it's an Uber ride into Sandwich. Consider scheduling your Uber ahead of time to avoid a wait. Once in Sandwich, every wedding activity is a within a 5-minute Uber ride.