While trying to create a face by poly-modeling it, I realized one of the loops wasn't flowing in the right direction, and I can't understand why this is happening. There are adjacent loops that flow on the correct direction, but I probably messed around too much on this specific loop and now the flow is gone. Why is this happening and how to fix it?
The flow of your problematic loop is correct.
Note that you have a vertex with 5 edges there, a so called E-pole. I colorized it so you can see whats going on.
If you need to add another loop there then you must move the pole away in the right direction, like shown here (image source)