You mentioned Cape Cod, and I was wondering what could be done if we spent a day there. I'm assuming we would have to rent a car to get there, right?
Yes, you would definitely need to rent a car.
As I mentioned above, Boston to Plymouth is 40 miles. To Sandwich, which is the beginning of Cape Cod (and I assume the birthplace of the Earl of Sandwich

)...is 58 miles. To Provincetown, at the extreme north end of the Cape is 120 miles from Boston.
Google Maps says about 2 1/2 hours, but that assumes no stops...which would be nuts. Plymouth would definitely be a doable day trip; depending how far out on the Cape you went, maybe not. We stay at least 3-4 days when we go to the Cape, and I think I would do at least an overnight just because of the distance.
Things to do: lots of quaint little towns, some nice beaches and lighthouses, and Cape Cod National Seashore (
https://www.nps.gov/caco/index.htm). We saw a lot of seals in the ocean when we were there last.
Provincetown is kind of an artist colony and reminds me a bit of Key West -- some interesting stores, restaurants, etc.
The summer is THE season on Cape Cod, but I'm not sure when it ends. We were last there during October (pre-Covid) and it was quite cool, but I haven't been there in August. I'm sure some local DISers can give you better advice than I can.