I was doing some reading on the laws relating to this, and I can't seem to get a clear answer. According to this source https://www.mattmlaw.com/blog/2013/04/underage-drinking-convictions-can-be-avoided.shtml (although it deals with PA laws, not sure if it's the same in MA), you need to show your ID if you have it with you, but they seem to imply that you don't need to identify yourself if you don't have your card with you, although they don't say that outright so I am not completely sure. This source says you don't need to provide an ID at all, but that's NC https://wileynickel.com/raleigh-defense-lawyer-blog/2014/3/16/do-you-need-to-show-your-id-on-demand-if-you-are-suspected-o.html. I couldn't find anything specific to MA. This is all assuming you are not driving.
I've been wondering about these laws because at my university, a lot of students get arrested for underage drinking, such as in their dorms or at house parties that get shut down. It seems to me that if there are no laws requiring you to provide your identification to the police, there's no way they can actually arrest you for underage drinking, since they need evidence to arrest you for the crime and the only way they can get evidence is by figuring out your age, otherwise all they've caught you doing is drinking, which based off of the information they have is not a crime since they have no reason to suspect you're under 21 (assuming you are close in age such as 18, 19, or 20). This is all assuming you're in a private area such as a house, apartment, or dorm, so that you can't be charged with public intoxication. I am unsure about this, however, due to the lack of information I can find on the topic, and that I would have thought that a majority of people would have figured it out by now if it is as simple as leaving your ID at home and invoking your fifth amendment and not telling the officers your age to get out of almost any underage drinking charge, but I suppose it's maybe not that simple.