The problem with space guns is you can't just yeet rocks into orbit. Any orbit that starts at the surface returns to the surface. So you still need a disposable rocket and avionics and fuel in every payload to change the orbit once out of the atmosphere. Only now the rocket needs to survive being literally shot out of a gun and then traveling at orbital velocity in atmosphere. That puts a pretty high floor on the cost per shot.