Rockets need to go fast parallel to Earth surface rather than just high, though atmosphere slows you down, so you start by going up to get where atmosphere is less dense faster and angle yourself steadily to gain orbital speed.
The first two pictures here explain it better than I ever could
SparroHawc@piefed.world 1 week ago
Rockets take off at an angle because they stay up due to horizontal motion, not vertical (once they’re above the atmosphere). Essentially they go so fast that the curved surface of the earth falls away exactly as fast as the rocket falls. If they just went up, they’d come back down at the same speed due to gravity. Gravity affects rockets for way further than you would think (consider that the moon stays where it is in orbit due to gravity).