Do I have to do research at the college I am attending to get into a good grad school?
In short, the answer is no, it doesn't matter where your research experience is.
If anything, I would say that it is more beneficial to have experience outside your undergraduate institution than inside, as this gives you the opportunity to meet many more potential collaborators, exposes you to new ideas and different research cultures and will hopefully give you a wider knowledge of your subject and academia in general.
However, if you're intending to continue at your current institution as a postgraduate student, then it would be wise to try and do some kind of research project (your course may require a final year dissertation, thesis, project or similar) with a current member of staff. This means you get to know them and more importantly, they get to know you and will remember your name when your application for postgraduate studies lands on their desk.
If a professor already knows you as a hardworking, reliable undergraduate from that summer project you did with them, they're much more likely to take you on in the expectation you will also be a hardworking, reliable postgraduate (in comparison to the stranger's application next to yours on their desk). Even if you don't intend to apply at the same institution for postgraduate studies, having a supervisor who can write you a strong reference is always a bonus.
Make the most of any research opportunity you get, and good luck with your studies (cosmology is a good choice!).
The answer from @astronat tells you what you need to know. I can add a little, since I taught mathematics and computer science at UMB for many years before recently retiring. For cosmology you want to get to differential geometry and partial differential equations as soon as you're ready. For particle physics you'll need group theory, then Lie groups. I recommend Professor Zara as a math advisor. I don't know who would best advise you in physics - be sure to ask soon when you get to school next month.
You probably won't be doing your graduate work at UMB, so of course keep up the Harvard research group. But you may find research opportunities at UMass too.
Have a good time learning!