https://crsreports.congress.gov/product/pdf/LSB/LSB10515
Supreme Court held that states may punish or replace presidential electors who refuse to cast their ballots for the candidate chosen by all voters of that state. Pretty much saying that it is a law that electors need to provide all votes to keep the election fair/just. Furthermore, in Chiafalo vs. Washington, it states that Washington could impose a fine against electors who violate their pledge to support the candidate chosen in the states popular vote.