For Residency: Research is something that competitive residency programs, especially at academic centers, look for applicants to have. If you don't take part in research over the summer after your M1 year, you will likely need to perform research during your M2 year or clinical rotations to gain the necessary exposure.
There will be a few meetings over the course of your first year that will give you more information about research. Always feel free to reach out to professors about research opportunities, and they will be happy to connect you with someone. Regardless of whether you take advantage of this opportunity, it is important to enjoy your summer!