A horizontal launch of a space rocket is not technically impossible.
However, the vertical one is the cheapest way to allow a spaceship to reach Earth orbit, as the vertical trajectory is the shortest to cross the atmosphere.
The rocket is pushed directly by the engines, while to launch it horizontally it must also fly in addition to the propulsion, so the lift created by the wings is also used.
These utilize the aerodynamic thrust of the air and stabilize the device in flight.
While they are an efficient system for airplanes, they are not suitable for vehicles traveling at high altitudes, where the air has much less density.
Adding wings to missiles would increase their weight, which we try to minimize.
Wings are also a problem for re-entry to Earth: those of the ship, which are also deployed because the balance between higher costs and benefits is assumed (the fact that the vehicle is reusable), become incandescent.