I’m not great at physics and have no knowledge of aeronautics, so this whole chain of reasoning might be wrong.
A plane stays in the air because air is moving over the wings, which generates lift. However, that air is moving because the engine is moving the plane forward. There is no other source of energy. Therefore, some of the engine’s energy is going into keeping the plane in the air, and some is going into accelerating it forwards, or keeping it at the same speed (fighting air resistance).
Therefore, if the plane points straight up, the engine should be able to support it hovering in the air. If it didn’t have enough power to fight gravity when pointing straight up, it wouldn’t have enough power to fight gravity when moving horizontally, either.
(Okay, some older engines only worked in certain orientations, but I don’t think that’s a problem for jet aircraft, or any aircraft built after WWII.)
So why can only certain planes fly vertically?
It’s because of the “lift to drag ratio”. Airplanes in level flight at ordinary speeds generate about 15x as much lift as drag meaning if the engine spends 1 unit of work moving the plan forward, the wings give 15 units of work* upwards. So flying level needs about 1/15th the engine power of going straight up. (I’m using “work” very sloppily here, not in a precise physics sense.)
You can see this in sailboats too, which can travel faster than the wind when they’re sailing at an angle to the wind. Efficient boats travel faster when they’re going almost perpendicular to the wind, not straight downwind! This is because the “lift” of the sail pulling the boat forward even more strongly than the push of the wind in the downwind direction.
While I can’t give an intuitive explanation for why this is, there’s a very easy demonstration that it’s true: kites. If a kite had a lift-to-drag ratio of 1, then it would fly at 45° up. It would fly 50 meters downwind of you when it’s 50 meters up. But any decent kite can fly at a much steeper angle than that; sometimes they look like they’re right over your head! That’s because with a lift to drag ratio of e.g. 10, the 1 unit of drag gives 10 units of lift; if it’s 10 meters downwind it will be 100 meters high.