Is it advisable to continue with a research project if I'm not learning much from it?
You don't need to understand everything that's going on.

But if you don't know enough to interpret what you're doing and why it's important, then you're right: there's no point in doing it.

Having said that, this doesn't necessarily mean you should quit right now. Ask your advisor to suggest some papers, textbooks, or other resources that can help you understand the background necessary for your experiment. There is no such thing as a topic that undergrads are not capable of understanding. There may be topics that would require a great deal of work for an undergrad to understand, but if you're willing to put in the work your advisor should be willing to point you in the right direction.

However, if your advisor is not willing to help you learn (or at least suggest ways for you to learn independently), then you're better off volunteering your efforts to someone you can learn from; it's time to leave.

(If your work does not represent a meaningful intellectual contribution to the research (as per your description), then your advisor will not be able to write a compelling letter of recommendation that speaks of your research ability for admissions to graduate school.)