How do they decide how many electoral votes each state gets
The electoral votes are apportioned based on a state’s representation in Congress — one for each member of the House and one for each Senator. So, Maryland, with eight congressmen, gets 10 electoral votes. That means the votes are roughly apportioned based on population, though some quirks distort the system a bit. Each state has at least one member of the House and two Senators, so the minimum for any state to have is three electoral votes. A semi-exception to the rule is Washington D.C., which has no senators and one non-voting member of the House but gets three electoral votes anyway.