As a former faculty member in several elite college and university departments, I have worked with and mentored a number of talented undergraduate and graduate students including several mathematics students. The advice I give to a student in this regard depends on the student's interest, and greatly upon the student's career goals. Students who pursue mathematics as a tool and firm background for a career in other technical disciplines (e.g., computer science, physics, electrical engineering), are most likely to profit from working on existing problems, even deep ones whose roots lie in other disciplines. That's what their career will likely entail.
If however the student seeks a career as a professional mathematician--particularly an academic, research or "pure" mathematician--the student must become expert in identifying and creating new problems. For such students, I would counsel they immerse themselves in their favorite subdiscipline and spend some time creating the problem, or modifying a recognized one.
Being able to ask the right questions and identify new problems is a talent that distinguishes the greatest mathematicians (and scientists) and is, alas, rarely taught or even encouraged in most academic departments. I published a peer-reviewed research paper with an extremely talented undergraduate mathematics student who solved a problem that I posed. (I was not his senior thesis mentor, however.) When he went off to one of the leading graduate mathematics departments he found that he could not identify new problems, as is the hallmark of research mathematics. Last I heard he dropped out of graduate school and programmed computers for a traditional bank.