That is the question, and whether you're Ma Long or Hamlet, you have to decide. Back when I started out, the answer was easier - except at higher levels, you mostly looped against backspin, and (except at higher levels) mostly hit against topspin or blocks, though there were plenty of forehand loopers, mostly playing from off the table. But as techniques advanced, and with modern sponge surfaces, the tide turned dramatically – and now intermediate players regularly do what only the top players used to do, especially on the forehand side, but often on the backhand side as well.
In the modern game, looping is almost always the better shot, if you can do it. The extreme topspin allows you to play almost any ball aggressively and yet consistently. (The exception is short balls, where the tables is in the way.) With sponges from when I started out, you needed a bigger swing to create this extreme topspin, and in a fast rally, you just didn't have time for this unless you backed well off the table. But with modern sponges and better techniques, even intermediate players can do this without backing up much, and so their shots are more aggressive and more effective.
So . . . which should you do?
If you are a beginner, you should start out with the basic strokes, which means hitting in rallies and (after you've played for a time) looping against backspin. But once you are proficient with these, it may be time to move beyond that.
If you are a junior player who dreams big, then you definitely should make looping the focus of your game. Do it on both wings, forehand and backhand. If you are a good athlete, you should do the same. This doesn’t mean you don’t block as well, but only when forced to.
If you are older, or aren't in good physical shape, you should consider focusing more on hitting and blocking. These are easier to do physically, and you can develop a winning game with them against just about anybody below the elite level. Or you might consider doing some physical training so you can play like the stars! Or you might decide, to heck with it, I'm going to play like the stars, and develop your game as a looper, like the best players, even if you might be better with more hitting and blocking.
In the end, it's a personal choice. I started out as a hitter many decades ago and reached a 1950 level in a little over two years. (I was a late starter at age 16, but I trained hard and long from the start.) Then I spent two years learning to loop and incorporating it into my game, and spent that time around 1800-1850 level. Then my game exploded - but I always could both loop and hit. Now, at age 63 (!!!), I can still easily loop in drills, but in games it's harder and harder to do so in a rally. And so I'm back to more hitting in rallies if I want to win. (It's also a primary reason I retired from regular tournaments, but still play hardbat tournaments, where I can just hit.)
So . . . what's your pick?