Yes, you can trap moving creatures
The way the 5e rules treat movement in combat, at the point in time when a spell effect resolves, a target creature has a specific, defined location1. As you can select where the spell effect resolves, you can pick that location to entrap moving creatures, without a saving throw. That, together with the fact that it is hard to get out of, is what makes wall of force so powerful.
This also works on flying creatures, as the spell says, it can be free floating, so you can target any area in the air:
It can be free floating or resting on a solid surface.
And it works on swimming creatures, as you can cast it into water.
So it does not matter for this if the creatures are walking, flying or swimming or how high their speed is, as long as you can target the area with your spell. This has nothing to do with DM discretion; of course a DM could overrule the rules as they always can, but according to the rules, this just works.
Burrowing creatures
The only exception would be burrowing creatures. The wall of force "springs into existence at a point you choose", and the spell area rules say (PH 204):
A spell’s effect expands in straight lines from the point of origin. If no unblocked straight line extends from the point of origin to a location within the area of effect, that location isn’t included in the spell’s area.
So even if you chose the globe form of the wall, the globe would not actually extend into the ground or the walls, as there is no unblocked line, so areas below ground or in the walls are not included in the spell's area. That means, a burrowing creature could escape into the ground and get around the wall that way. One way to try and avoid this could be to target the globe above ground, so that it just closes underneath the creature or pushes it up into the globe. The spell says:
If the wall cuts through a creature's space when it appears, the creature is pushed to one side of the wall (your choice which side).
This works well to isolate creatures from walls. However, vertical space is not really well defined in the rules, which mostly treat space in combat as a flat, two-dimentional affair. So while I think this should work also for the ground, you should check with your DM on how they handle this corner case.
1 Combat is turn based, and by the game mechanics creatures normally only move on their turn, unless they have a Ready action to move on a trigger condition. That means, when you cast the spell on your turn, it is not the turn of the other creature, so its position is known. Even if it had a reaction trigger to move away if you start casting a spell, normally the reaction only happens after the trigger, and they would be cought; moreover, even if your DM allowed it to move before you are done casting -- say, reacting to you starting to cast, you likely only chose the spells target as it resolves, so you could just pick the area they moved to. Lastly, even if you cast wall of force as a reaction on their turn, in response to them moving, or starting to move, the same applies: at the time when your spell resolves they either have not yet moved, or have moved, and you can select their space as your target.