They asked me to enter the non Massachusetts portion of the amount I paid during 2021 to social security, railroad, Medicare, U.S or MA retirement.
Add up the amounts on your non-Massachusetts W-2s for boxes 4 (Social security withheld) and 6 (Medicare tax withheld) and enter the total.
Thank you, @ErnieS0