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?
There’s nothing wrong with your reasoning, it just doesn’t account for all of the factors involved. There is a big difference in efficiency between using the forward movement of a wing to provide lift and using direct propulsion pointed downward. There are a few planes that have a greater than 1:1 thrust to weight ratio (the F-15 being the most famous), but it is rare. Fixed wing aircraft and helicopters are all able to fly with less power because what they have is being used more efficiently.