Boston is 2 hours from where I live so we go pretty regularly for weekends.
We don’t do stuff like get coffee from Starbucks. It’s ridiculously overpriced.
We check prices before we book restaurants. A fancy meal out might cost $450 for 5 of us but typically we’d spend much less.
Bring snacks, eat picnics in the park, get meals from Wholefoods, pizza and pastries when you’re in the North End, etc.
Are you going to be north or south of Boston OP? I’m not convinced you need a rental car the entire time. Parking in Boston midweek is so expensive that you’re better off travelling in by bus, train or T. Boston has excellent public transport (OK let’s not discuss the Green Line.) At weekends we park in Post Office Square which is cheap.
I’d consider renting a car for maybe 5 days and spending those going to Salem, Cape Cod, New Hampshire, etc.
Look at what you want to actually do in Boston and add up those costs. We loved the Science Museum when the kids were younger, Newbury St for window shopping with older teens, Isabella Stewart Gardner museum, and just meandering around the place. You don’t have to do tourist attractions all day.
I’ve been told that the cheapest way by far to see a Red Sox game is to queue for tickets half an hour before the game. Never done it myself.
Honesly I think 10 days in Boston is too much, and there are so many other great places to visit within a few hours. Coastal Maine is fabulous in summer/fall. The NH White Mountains are full of fantastic hiking and some cool waterfalls.
You can spend a fortune in Boston if you want, but there’s no need to.