Because maybe a healthy dose of self-critic and a bit of honesty might be for the best.
Warning: This essay is heavily biased towards graduate school in pure mathematics (where I have some personal experience). Some things might be completely opposite for other field. Most likely I can’t say anything about that, sorry. Additionally, by “graduate school”, here I mean MS-PhD level of education (and as I said above, heavily biased towards pure mathematics). My view here will be a bit Indo-US centric. I got a first-hand experience for MS program in mathematics under Indonesian system. My knowledge about US graduate school system is mainly based either from talking with people currently/used to enrol in PhD program in mathematics at US university or from Steven Krantz’ “A Mathematician’s Survival Guide” (which is a fantastic read if you’re aiming for a PhD in mathematics, despite being very US-centric). Keep in mind that talking about graduate school (in the context of pure mathematics) in the US usually means the PhD program, since it’s unusual for student to be admitted just for a master program. It’s possible for a sufficiently strong person with just undergraduate degree to be admitted directly to a PhD program there and receive their master degree in the middle of their PhD program.
Warning 2: Sotoy rambling ahead. Suck it up or leave.
How is it different? And a bit about motivation
I assume you are currently pursuing through an undergraduate program or already graduated from one (otherwise, this essay probably will not be of any interest for you). In mathematics, by your fourth year (if you’re under Indonesian system) you’d typically already took a course or two on linear algebra plus a semester of abstract algebra, a year-long course on analysis, probably some probability theory or discrete mathematics, and possibly a sprinkle differential geometry or topology (though I know damn well that if you’re in ITB it’s possible that you probably doesn’t quite satisfy this). Your class mostly will consists of lectures, recitation/tutoring, homeworks, and exam. The latter most likely will be the biggest factor that will decide your grade, despite taking the least amount of time. And if you’re under the Indonesian system, you’d write your bachelor thesis too in your fourth year. This can consist of doing some toy problem assigned to you by your advisor (that you hopefully recognize that it’s a toy problem meant for you to learn instead of a full research problem that you’d want to bring to the end of your career), making expository writing from some paper, or something else.
For a master program, things probably would not look too much different to your undergraduate years. At least under Indonesian system. You will take less amount of course per semester. You just need to understand that this doesn’t necessarily mean that you can spend less time. A 3 credit-hour class might only have two 1.5 hours class weekly (or one 2.5 hours), but the rule of thumb is that you for every credit-hour you should at least try to do self-study and spend time really thinking about your homework at least 5 hours total. So a 3 credit-hour class is probably spend 3 hours on lecture, 5 hours on self-study, and 5 hours on homework (transfer this to your self-study hour if there’s no homework for that week). This highlight an important thing: to success on your study, you must study. After all, why would you register to a graduate program if you are not interested to do this kind of work?
I can’t stress this enough. The reason you’re asked to write a statement of purpose/motivation letter when you apply to a graduate program is to ensure (among other things) that you know why you want to be there. If you had a hard time writing one, it’s possible that you’re just not good at writing (and this can easily be fixed by talking to someone that can help you articulate your interest in written form), but it’s also possible that you have doubt about your own motivation. This is even more important when you’re aiming for a PhD. Unlike a master degree which consists mostly of classes plus a small portion of thesis (and in pure mathematics, it’s not unusual that your thesis is not about making a novel breakthrough) and lasts one to two year(s), a PhD is typically a 3-6 years long journey, depending on where you do it, that consists mostly of training you to be an independent researcher. A course in a master program would (and should) be more challenging than its undergraduate counterpart. It would (and should) expect more mature background from the student. It should be normal for you to feel that the course is hard, though you being admitted in the program should means that you’re expected to be able to complete it eventually, with enough struggle (and I think it’s a sign of something being wrong otherwise). Don’t worry, you don’t have to go through that alone. Ask question and discuss with other person. You will need that discussion skill.
Should you do research during your undergraduate?
I think this is a fair question, especially since outside of pure mathematics it’s very common that the answer is a yes. I’d say pure mathematics is a bit different. To do a (good) research, one should already have a good foundational knowledge beforehand. Acquiring this foundational knowledge is a non-trivial process and will take some time as mathematics is built layer by layer. You can’t expect to do a research in algebraic topology today if yesterday you don’t even already know what a topological space is. This is not something that you can easily skip. Having a good foundational knowledge also helps you understand the motivation behind why certain stuff is defined or certain technique is used (or at least help to push you to find the motivation if you don’t already know).
For master program, the answer should be easier. Do it if you want, but it’s probably not that necessary. Just keep in mind that you should not stick to your undergraduate research field too much and refuse to do something outside of that. It would be unproductive and only be a subject of premature obsession.
For a PhD program (under the US system, but should be similar otherwise) the main metric is the proof of research potential. Under the US system (and most likely under other system too), when you apply for PhD program, you’d be asked for, at least, your CV, academic records (which includes your GPA, classes taken, etc), statement of purpose, and how should they contact the people that will give your recommendation letter (you should not write this by yourself and you should not be able to know the content of your recommendation letter; this helps the recommendation giver write a thorough and honest evaluation of you). This will be used to make a complete judgement regarding your research potential. One of the proof of good research potential (though this is usually not necessary in pure mathematics) is an actual good publication. The word “good” should not be skipped there. In a system that cares about quality, it is a career suicide to publish no matter what if your result is not good (or not even a result). A good peer-review system should protect you from that (by rejecting your publication submission), but unfortunately we live in a non-ideal world where sometimes th review process would not be able to protect you from that. Keep in mind that the proof of research potential doesn’t necessarily come from actual research experience with actual publication. It can simply came from a reading course that you took together with a professor and results in an expository works. It can also came from good understanding of the technical background on your field of interest beyond things that are taught in the class (for example, you probably already have a favourite theorem and can explain the motivation behind it, why is it your favourite, and can highlight the general idea of the proof). It can also came from a research experience for undergraduate (REU) program, like The Polymath Jr or ANU Future Research Talent, which doesn’t necessarily results in a publishable result. I think that this kind of program should be what you are thinking of when talking about undergraduate research experience.
To answer the original question: it might be beneficial for you, if it’s good. Doing a research during your undergraduate can help you study as much mathematics as you can. It can exposes you to new stuff beyond what is taught in the class and give some feels about how research (and collaboration in research) is done. However, you should also not expect to continue that to the graduate school. You should starts anew with your new advisor. In a way this is also important to ensure that you don’t prematurely obsessed with a problem/topics (that might turns out to be not that interesting, after all).
Should you go to graduate school, then?
I don’t know. But if you want to know, ask yourself and be brutally honest about it. Why do you want to be in a graduate program? What is your goal, both short term or long-term? Why do you set that goal? How is being in a graduate school helps you achieve that goal? Have you considered another option? Talk with other people (especially to those who are currently in a graduate school and to those who already graduated) that knows you well professionally and personally.
I want you to think and think again, be very honest with yourself. I am not discouraging you from applying. I just want to help you make a decision that you will not regret. And for that, I need you to be honest to yourself.