This link:
https://www.mass.gov/how-to/apply-fo...-from-a-dealer
if you scroll down the link provides info on what is required when purchasing a vehicle out of state.
Added: I have bought several cars out of state. Lived in MO and bought a car, 2 cars, in KS. Then more recently living in AR bought a car in KS, another in CO, and the most recent car (2023 M2) I bought in MO.
I had a bit of problem getting a title to a couple of cars because the bill of sale didn't show I had paid for the car in full. I gave the dealer a personal check for the balance but the bill os sale didn't reflect this.
I didn't notice this and registered the vehicle and surrendered the title -- which I received by mail some days after the purchase and after my check had been processed and cleared -- and AR rejected my application for a title because according to the BOS it looked like I owed for the car. I had to request a corrected/updated BOS from the selling dealer.