Flat roofs should not actually be flat! They should have a gentle gradient on them to allow the correct drainage of rainwater. If not, standing water can accelerate deterioration of the roof covering.
Here there is a gradient but the slope leads to a “lip” on the front edge causing rainwater to collect. This photo was taken three days after the last rainfall. A drainage channel should have been formed and some adjustment of the existing arrangement will be necessary.