while driving it will lose power, like it is not getting gas flow
Your car has a problem. Take it to a good mechanic. That is about all I can tell you with so little information.
If the yellow check engine light is flashing when this happens, stop driving it. If the red low oil pressure light is on, stop the car immediately or you will destroy your engine.
A fuel system problem is indeed a strong possibility but it’s not the only one. If the check engine light is on–but not flashing as noted–or if it comes on when this happens, take the car to AutoZone or someplace similar and have the stored codes scanned. Post the code or codes here and someone can try to help. Or you can simply take it to an actual in-person mechanic, which is what you’ll need to do eventually anyway.
My older Rabbit would do that sometimes, problem in that case was always related to the fuel system, reduced fuel flow. One idea, a fuel rail pressure test.