If you rent an apartment or house directly from a landlord.
You usually don't need an electricity contract
if you sublet an apartment or room (from another person), or
if you rent your apartment or room with an "all-inclusive" contract like via Airbnb or similar.
If in doubt, ask your landlord.