Depends on the Theater of Battle and the fighting doctrine.
Unless planning on surprise, attacks were preceded by artillery bombardment on various scales in both wars. Battlefield communications were improved allowing for more frequent and more accurate fire missions during the '39-'45 conflict.
Airpower had, perhaps, the biggest influence on artillery.
While it will never be obsolete, artillery has been somewhat hamstrung by it's lack of mobility. In today's warfighting scenario mobility wins the game and death comes from above like it has for nearly 3/4's of a Century. Of course we still have the "heavies" and they come either self-propelled or quick set up M777's....which I love.
The advent of the 35mm mortar's combat performance during WWII helped as well. Practical HE fire support on the back of a couple of squad members. Brilliant stuff from a tactical perspective.
Maybe we gotta bottom line here.
"More effectively overall" should probably be the answer to OP's question.