I can’t contribute to the forefront of modern research, but, roughly equivalent to the way musicians can go out and play gigs, what can an undergraduate mathematician do, apart from reading math books and taking classes? Can they try to prove things, at least in easier, recreational fields?
Feynman talked about how you can rediscover things that are known, until eventually you catch up to the modern day and discover something not known yet.
You see – I have had in my life a number of pleasant experiences. One of the earliest ones was when I was a kid and I invented a problem for myself – the sum of the powers of the integers – and in trying to get the formula for it I developed a certain set of numbers, the formula for which I couldn't get, and I discovered later that those were known as the Bernoulli numbers and they were discovered in 1739. So I was up to 1739 when I was about 14.
Then a little later I'd discover something, and I would find out that I just may have invented a thing which we now call operator calculus. That was invented in 1890 something.
Gradually I was inventing things that came later and later. But the moment when I began to realize that I was now working on something new was when I read about quantum electrodynamics. I read a book, and I learned about it. For example, I read Dirac's book, and he had these problems that nobody knew how to solve. I couldn't understand the book very well because I really wasn't up to it. But there in the last paragraph at the end of the book it said, "Some new ideas are here needed." And so there I was. Some new ideas were needed. OK – so I started to think of some new ideas.
You can try one non famous unsolved problem: for example in https://en.m.wikipedia.org/wiki/List_of_unsolved_problems_in_mathematics
Or in the famous book of Richard Guy "Unsolved problems in number theory"
and search for what it is known. There are problems which few people working in them and there is some chances to say something new...
You can choose an open problem and start digging into the subject. Get a notebook and write down everything new you learn on the topic. This way you can easily find fields in which you lack knowledge and get a lot of experience through reading other mathematicians' articles, in-depth books and so on.
The equivalent to a musician's gig is to get a job that requires some level of math. There are in fact some places that have student positions or other gig-like slots, for people with some STEM background. These are not programming positions, though some programming knowledge may be required. A basic background in linear algebra and statistics can go a long way in these positions. This could be an excellent way to get some experience in math, and to cooperate and learn from mathematicians and engineers.