The surplus and/or deficit is a flow because we measure the surplus or deficit at each fiscal year.
A flow is a change to a stock over a period of time. A surplus is how we measure what is left over, extra after a period of time. The deficit is what we find when there was not enough of something over a period of time.