Naval design seems to be focusing on building ships that can generate as much electricity as possible, and with good reason.
Laser bursts will cost less than a dollar each compared to $10,000 to $1 million for various missiles, which require storage and have explosive risk.
Railguns do not use explosive shells, which means more projectiles can be stored on board with no risk of explosion.
The see BS Sunday morning show had a story about the Zumwalt. They bragged about guns on the front deck fire missile assisted rounds that could hit targets 60 miles away! Woo hoo woopy that’s not much further than the big boats of WWII ( I think). But even that is a poor trade for an air launched rocket.