Currently sailing to Mexico. You need to obtain an import permit for your boat into Mexico, even for short time. It's called a Temporary Import Permit, TIP and at today's rate is just under $20. You can ask for it between 11 and 60 days before arrival in Mexico. The application is done online at https://www.banjercito.com.mx/registroVehiculos/# Top right switches to english if needed.
You will need your boat registration (Federal Coast Guard Documentation or State issued Registration) Passport of boat owner
If the boat is owned by an LLC you'll need more ownership proof.
On arrival in Mexico you must contact immigration and customs. You'll need to fill in paperwork and present crew list and crew passports. Declare any alcohol, controlled medication and similar. Until you have sorted this you should fly flag Q, quarantine yellow flag. Once you have been given authorization (clearance) into the country you take Q flag down and replace with a Mexican courtesy flag, flown on Starboard side.
Failure to do the above can land you in major trouble.