Background in pure math here. Generally researchers learn about what problems are fashionable as they talk to others in the field. As a PhD student, your advisor should give you ideas for problems to work on. Solutions to old problems tend to open up new lines of inquiry. It's a potentially infinite process, with the only limit being the capacity of the human mind.
The odd perfect number problem has been unsolved for thousands of years:
https://en.wikipedia.org/wiki/Perfect_number
Why would anyone want to know the answer to this problem? The truth is that the motivation for most pure math research is purely aesthetic. You could also ask arts or english departments "How can you apply your paintings or novels?!?". Some mathematicians (mostly geometers and topologists) are inspired by problems in physics, but most aren't. In truth you never know what structure or theorem might have some future application; number theory was totally "useless" until modern cryptography made (some of) it useful.
For just a tiny taste of one small area of modern math, I dare you to click on any of the links here:
https://en.wikipedia.org/wiki/Floer_homology
We are flush with structures to investigate.
The idea that "most discoveries have been made" is nonsensical in a domain where the discoveries to be made are literally infinite. To give a hint as to the infinite nature of mathematical inquiry, you probably are familiar with the idea of a function mapping a number to another number. A good deal of modern math is involved with much higher order functions; we can have functions that map functions to numbers, functions to functions, functions to spaces, and so on and so on. And then we can consider functions between those functions (and so on). Category theory is an attempt to give a framework to some of these "meta" relations. It should be obvious there is no limit to these structures and no limit to the number of problems one could pose about them.