Really depends on the region and any pre-existing constraints at the time of electrification. A better distinction is probably rapid transit (metro, subway, the Tube, MTR/MRT) vs commuter rail.
Apparently in the US there are trains that use dual rail and overhead power, one for subway and another for overground portions.
I suppose a subway train with rail only supply that goes overground sometimes is more dangerous because it is easier to accidentally step on a rail and rail is powered?
Not in Tokyo. All but the first two of Tokyo’s subway lines run on overhead wires. In fact they had to build most of the subway lines to suburban rail standards because they planned on operating through services in the beginning.