The levitate spell description states:
One creature or object you can see rises vertically, up to 20 feet, and remains suspended for the duration. The spell can levitate up to 500 pounds. An unwilling creature that succeeds on a Constitution save is unaffected.
The target can move only by pushing or pulling against a fixed surface, which allows it to move as if it were climbing. It can also move up or down as part of its movement. You can change the target's altitude by up to 20 feet on your turn. Otherwise, you can use your action to move the target, but only within the spell's range.
What happens to a flying creature if levitated?
It sounds like the targeted levitating creature would need to push/pull a fixed surface to move, but this doesn't make sense to me for a creature that is already flying.
Best Answer
Flying creature that fails the save stops flying and begins levitating
TL;DR: The spell does what it says it does, and it is very specific about the only way an affected creature can move.
Spells do what they say they do
Q&A about spells doing what they say they do
For rules as written, it doesn't need to make sense in a physics sort of way. It's magic. Seems like a clever use of levitate is to stop a flying creature from being able to fly.
Specific beats general
Basic rules intro on specific beats general.
The specific description of the spell beats the general fly speed movement.