Specialise now or broaden knowledge? I am currently an undergraduate student in mathematics coming to the end of a 4-year Bachelor degree. I have strong credentials (good marks, plus research and teaching experience) and have been doing research with one of the leading Professors in my area since the second year of my undergraduate degree. I have a couple of publications with this Professor as well and most would say I have a very strong foundation to do good research in this particular area of study during my Masters, PhD and beyond.
I have been keen on learning/studying another area of mathematics for a while now that has connections with my current area of study, though, would require me to change to a different area of research. I'm considering changing to this other topic of research for my Master's degree, both because I'm interested in doing research in this particular area, and also it would be good to broaden my knowledge at this stage of my career. Though, my current supervisor and mentors seem to have high expectations for me to continue here, and they have relatively large research group set up at my current institution that provides me a lot of undivided support.
Would it be silly for me to change universities and research areas when I already have a good setup now, or is this stage of my career a good time to move, learn and try different things before a PhD? I feel it would be better to stay in my current area as I have a good foundation here and am quite knowledgable of current research, though, I don't know many people who specialised in their research area from 2 years into their Bachelors degree. Is it a risk making this change seeing as I would have to get up to speed in the other area of research, or am I overthinking things?
N.B. Master's degree are mostly research based in my home country, minimal coursework is completed.
If you are on a trajectory that will let you quickly complete a doctorate, then I'd suggest that you don't redirect at this time. This depends on your country, of course, and the requirements for a doctorate. In the US, having a broad enough knowledge base that you can pass qualifying exams is a necessity and is also an advantage in that you would be able to teach nearly any undergraduate course after completion. But standards differ.
But you can always broaden your view later if a narrow view is indicated at present. And you can then do so without compromising career goals.
I'll note also, that having insight into one area of math doesn't necessarily translate easily into insight into others, even if they seem quite similar in some ways. I (retired now) had great insight into Real Analysis, but very little into Abstract Algebra. I could fight my way through algebra but it wasn't fun. So, broadening may mean a longer path than you need to travel at this instant. But math can also be synergistic, so ignoring other sub-fields, long term, probably isn't optimal.
If you are well supported in what you are doing now and the end point is reasonably in sight, then it is probably best to keep on keep'n on.  But note that this is mostly just opinion, and others will differ.