The substation is needed to further improve the main buildings in the settlement. Just putting all the resources in it isn’t enough. Right after that the substation needs to be connected to the power unit. 
You place the power unit in build mode, just like the cable.  



The power unit also needs to be built in the settlement itself. 

If there is still no electricity, check that you have run the cable to both mechanisms to the end. To do this, in build mode, by selecting the cable on the tab, you need to tap directly on the substation and directly on the power unit.
If the cable is not laid to the end, then it will look like this:

If laid, then like this:

The power unit also needs to be filled with gasoline. The cable rotates automatically; the path to it should not be blocked by stones. It is worth making at least a minimum distance between the mechanisms. The power unit should not be placed directly on the stone.

If it still doesn't work, do not despair, other players have already prepared video guides for you on YouTube!