Full disclosure: I just finished grad school.
There is no royal road to research, and there's no way to know ahead of time what approaches will work best for you. This is one of the reasons grad school is so hard!
There are a couple obvious pieces of advice. First, do frequently glance at recent publications, if only to get a sense of what people are interested in these days (this can change in a field over time!) and what keywords keep coming up (so you know what to look for). Also, never stop dipping into books, even if you find it more useful overall to spend time with recent papers; I personally don't find it very useful to read a book cover to cover, but I try to spend a certain fraction of my time checking out chapters of books that I haven't read yet. Basically, is it a resource? Then I should probably check it out from time to time.
Ultimately, some of this will be fun and some won't be. The naive advice is "do what's fun." That's not wrong, but it's dangerously under-nuanced. Certainly do what's fun, but also try to understand what makes the non-fun things non-fun (and bite the bullet and do some of them sometimes). This can be a good way to see your own weaknesses before they bite you. For example, I tend to get impatient very quickly with books, and much prefer reading recent articles even if I don't understand them fully. Fairly early on, I realized that this was less a problem with books, and more a problem with me: I was having trouble staying focused on a single long argument or (even better) series of arguments leading to a well-developed theory. Basically, I wanted to run before I could really walk. That's definitely something about myself that was good to know early on.
Separately, getting a good sense of what makes something fun for you can help you define your own area of interest in research. Your advisor is there to guide you (in oh so many ways), but at the end of the day you should develop a sense of direction and of what kind of problem you want to work on. This is really hard, and starting by thinking about what kinds of mathematical activity you enjoy will help. The sooner you start looking critically at your own preferences, the better.
Finally, remember that the people around you are also resources (and be a resource to the people around you in return!). Get advice from lots of people. They'll tell you radically different things, and that'll be confusing at first, but over time you'll get a good sense of what sort of advice "feels right" for you.
And keep in mind that you're learning to do research. This process will feel inefficient because it is inefficient: hopefully by the end of the Ph.D. program, you look back and say "I could have done this all in much less time!" Congratulations, you've learned how to do research.