The water flows from underground pipe when the water in main pipe is released to 1st floor of the building but not to the overhead tank which is on 5th floor. The pressure seems to be not building up for the overhead tank - seen in the meter fitting on the pipe, but for the 1st floor it seems to be fine. What could be the reason?
Water pressure at the ground level is the issue here as your pipes go up you lose pressure at .445 pounds per foot 5 stories up ~50’ your pressure would be ~22 psi less this may not be enough pressure to open the valve to the tank. If you are on a well you can increase the cut out pressure on your pump. If on a city water system contact them about the low pressure. Other than that a booster pump to increase pressure may be needed to provide enough pressure for the tank to fill.