The wire in the cord has much lower resistance than the heating element. The heating element is a resistive or resistance heating element. Resistance in the quality of a substance or material that causes it to limit current flow, and it get heated up in the process. The heating element has all but the smallest fraction of the resistance in the circuit, so the heat, that thermal energy that get the water hot, is generated by the resistance of the heating element.