Quick search by citation:

3 U.S. Code § 4 - Vacancies in electoral college

Each State may, by law enacted prior to election day, provide for the filling of any vacancies which may occur in its college of electors when such college meets to give its electoral vote.

Editorial Notes
Amendments

2022—Pub. L. 117–328 inserted “enacted prior to election day” after “by law”.