The law that says that one must be 18 to vote for President is a federal law. But the states are allowed to run the elections in accordance with their own state laws.
So, for example, some states have more days of “early voting” than others. Some permit the elections boards to start counting absentee and mail in ballots prior to the close of the polls and others require that the state elections boards refrain from doing so until after the polls close. The way the ballot itself is laid out is up to the states. (Remember the hanging chads of 2000?). Some states only have mail in voting, others have hybrids. In Maryland, we have early voting, mail in voting, absentee voting, and show up on election day voting.
So, when the election challenges come, should Biden hold on and win, you’ll have an interesting dynamic. The Republicans will be arguing for federalism. They’ll want the federal courts and the S. Ct. to make national election rules by which all states should abide. The Democrats will be arguing “states rights.”
It will be interesting to see if Justice Barrett or Justice Kavanaugh or Justice Alito or Justice Thomas, as “originalists” and “strict constructionists” can scrutinize the constitution and find a provision in the constitution which says that it is forbidden for a state to have a rule permitting the counting of a ballot received 3 days after the election if the voter mailed it timely.