Master student pursuing PHD: how to spend summer break?
I think what you're asking is fairly subjective, might depend somewhat on your field, and also, your options and opportunities can differ greatly according to the country in which you're doing your Masters.
The most I can offer, as somebody who just started a PhD, is to tell you what I did during my Masters (that was outside of regular program) and, more importantly, why and how I think it helped.
I did two research internships abroad, one before my last year of classes, and one during my last semester that played out as co-supervised research for my Master thesis.
What I got from that:

I saw what research entails in other countries where research is important and valued (research in Croatia, where I come from, is at mediocre level at best)

I experienced working in two very different labs, under very different supervision, different lab dynamics and approaches towards research

I discovered which setting works best for me and which setting I work best in
(e.g. I prefer a relaxed, flexible environment and being advised/supervised by somebody openly helpful and talkative (it's just a thing for me) as opposed to strict working hours, getting tasks without understanding the importance and when the feedback (especially the negative aspects) is constrained because of inherit cultural politeness)

I made valuable contacts who are at various levels in the research hierarchies - some of them gave me ideas, others encouragement, and some even gave me recommendation letters

in informal settings, I exchanged concrete ideas as well as general attitudes towards research and science (and life) with people that come from different cultural and academical backgrounds

I found out how (very different) PhD students think of their &quot;jobs&quot; and what they think of their career choices and I was free to make my own assessment about how happy and fulfilled doing the PhD made them and why, so my guess about how happy it would make me was more educated

the proximity to the location where I finally applied for a PhD got me the PhD grant - I would have never gotten that particular one if I wasn't there to have a few informal talks and give my grant presentation



To summarize, what you should be aiming to get from your summer activity is diversity. Diversity in attitudes, approaches, contacts and ideas. You're allowed and encouraged to work and thrive in an environment best for you for anything more permanent (several years long), but you can't really know what you prefer if you never tried anything different.
I'm not going to tell you which activity to choose, but I would go to the one that had the potential to expose me to most new people, ideas and attitudes. You can always sacrifice some sleep to do extra work, but no amount of work in the world can measure up what you get from formal and informal interactions.
In my (a bit Utopian) view of the world, that's how science progresses: scientists travel and during those travels, the best of many worlds collides. By the end of those travels, hopefully, all the worlds are a little bit better off. When you're old, wise and grumpy, you travel to give back to the community and spread the ideas you spend a big part of your life to shape. But, since you expect to be giving back later, that entails you to travel when you're young, curious and perky, and get the most of what the community has to offer - little, baby ideas, and chisels to shape your own ideas.