Could be e-fan relay. Could be coolant temperature switch.
To test the relay, have the key on/engine off ,unplug the fan relay, drivers side fender, using a wire, jump relay connectors - 30/87. If can comes on, then move to the switch.
Disconnect the switch at the harness. Jump the harness plug with the same wire. KO/EO. If fan works then switch is bad