The effect takes place immediately
Note: This answer only considers the named features that you mentioned in your question, Flurry of Blows and Open Hand Technique. There are a lot of features that apply Shove in 5e and the answer will vary depending on their wording so I’m specifically considering the wording of just these two here.
The attacks that you make happen consecutively, one at a time, not all at the same time. Therefore they also get resolved consecutively; the consequences of an attack get applied before you make your next attack.
From the Open Hand Technique feature:
(…) Whenever you hit a creature with one of the attacks granted by your Flurry of Blows, you can impose one of the following effects on that target (…)
The effect happens when you hit with an attack; it doesn’t say that there’s a delay involved or that it takes effect after you have made all your attacks, etc. Therefore, the effect occurs immediately after you make an attack and hit.
Flurry of Blows states:
(…) you can spend 1 ki point to make two unarmed strikes as a bonus action.
Each of the unarmed strikes that the feature lets you make is a separate attack which requires a separate attack roll - they happen and get resolved consecutively. An effect that takes place on a hit will happen immediately after it; if the first attack is a hit, the effect will happen in between the first and second attack.
So in your example, yes, if you hit with the first strike in a Flurry of Blows and decide to push the enemy away, it will be pushed immediately and end up out of your range for your second attack.
Extending this answer to the features that you’ve listed in comments - they are both worded in a similar way to the Open Hand Technique and would function in the same way:
Gathered Swarm: Once on each of your turns, you can cause the swarm to assist you in one of the following ways, immediately after you hit a creature with an attack: (…)
This feature goes further by explicitly stating that the effect happens immediately after you hit.
Pushing Attack: When you hit a creature with a weapon attack, you can expend one superiority die to attempt to drive the target back. You add the superiority die to the attack's damage roll, and if the target is Large or smaller, it must make a Strength saving throw. On a failed save, you push the target up to 15 feet away from you.
Again, this takes effect when you hit a creature. The maneuvers are worded in a way that is very precise about the circumstances in which they can be used. The fact that the creature gets a saving throw here is immaterial in this context; all it means is that the effect doesn’t happen automatically. The save is resolved at the same time as the damage of the attack, and then you make the next attack.