Both gun and rocket artillery supplement each other. Neither can replace the other. The main advantage of Rocket artillery is the massive firepower it can bring in a short time.
For example, The British LCT-R could launch all of their rocket artillery in less than 5 minutes, and those ships delivered 1000 three-inch rockets within that period. Also, according to the British, the firepower it could provide within that short period would be equivalent to 80 Cruisers!
The American counterpart LSM(R) can deliver rocket firepower, equivalent to the combined firepower of 2 IOWA Class battleships!
The most effective artillery bombardment would be the first seconds of the initial salvo when the target would be unaware, unprepared, and not in cover. Thus, users would best use these rocket-based systems to saturate an area as large as possible by killing as many targets and causing as much confusion as possible.
Because of that, the rocket artillery’s main appeal was its unmatched capability to deliver heavy firepower on the first strike.
The launching system is also straightforward. A metal tube or rail would do, so the outfitted platform can be very cheap and could be manufactured in small workshops. Unlike a gun barrel, which is very heavy, the launching system doesn’t require as much specialized equipment to make and therefore is cheaper than a gun barrel.
Another main point is that rocket artillery platforms can deliver all of their ordinances quickly. They are also the best at “shoot and scoot” tactics since they can soon provide heavy firepower and re-position, minimizing the risk of being hit by enemy counter artillery.
The gun-based platform, however, is the polar opposite of what the rocket-based platform would be able to do.
After a mass salvo of rocket strikes, it would require much time to reload. An army with a 100% rocket system would give the opponent some breathing room and a chance to regroup and re-organize, especially after the initial strike or within the gaps between salvos.
Gun artillery doesn’t have this problem. While lacking in shock and awe compared to rocket-based systems, gun-based artillery platforms can deliver sustained bombardments for extended periods (many days, even weeks).
Therefore, the guns can keep pressuring or pinning opponents with constant bombardment and slowly dismantling or hindering the opposition.
This is why both systems would never totally replace each other.