Hey @Anna Windsor, it's difficult to say which MA city is best to invest in for you without more information. Mainly, are you looking for a cash flow, appreciation or hybrid investment.
Based on this determination it is easier to suggest locations to research.
Nonetheless I have included a resource below that I put together. Its a spreadsheet that lists all incorporated places in MA with populations over 10k. For each place I have included population, home value and rent figures, as well as the 5 year change for each of these. The last column shows the rent to price ratio (1% rule).
If you want more cashflow, I would optimize for the highest rent to price. If appreciation is what you're after then consider places with high population growth.
The color scale corresponds to the values for each respective metrics and indicated the desirability (green is better, red is worse)
Link to MA Cities Spreadsheet
Hope this helps!