Varies by state. My state used to not allow counting until the day of the election, but they changed it because of covid, hopefully it will be changed ongoing, because I think it is much better to count as they come in. I don’t know if ours was changed by executive order of the governor (he did sign some executive orders pertaining to the election, but I don’t know for sure this was one of the things) or if it was done some other way.
Some states they tried to change it, either the Supervisor of Elections or Dem representatives tried to get it changed, but Republicans blocked it.
My understanding in Pennsylvania was they could start before election day, but some counties (red counties) wouldn’t.
The Republicans in blue states wanted the counts to last a long time to try to disqualify them.
Senator Scott in my state introduced a bill to disqualify any ballot not counted within 24 hours of election day. He guised it saying there should be more uniformity in voting laws across the states. He is a piece of garbage and so obvious in his intent. He knows full well some states don’t allow counting to commence until election day, and he knows in most states mail-in is mostly Democrats. If the voter did everything right then it is not their problem if the elections people are slow to count.