Birds don't get electrocuted on power lines because they are only in contact with the hot wire and not making contact with the neutral wire to ground themselves out.
For electricity to travel through the birds body the electricity needs a path to ground and since birds are sitting on only one wire even when it's a hot wire with electricity flowing through the bird is isolated and insulated from the ground.
If the bird were to sit on the hot electric wire and then make contact with the neutral or ground wire then they would be electrocuted.
The same would be true for a lineman who would be able to touch the hot wire while being insulated from the ground.
In order for a human to be electrocuted they have to also make contact with both the hot wire and the ground wire or the ground.
Lineman work on hot and live wires all the time although they also insulate the wires as much as possible in most cases and wear protective gloves to prevent them from potentially coming into contact with other wires that could cause them to get electrocuted.
Even squirrels that would walk across live electric wires do not get electrocuted because they are not touching the ground.
For electricity to flow and create a circuit it needs another wire which is the neutral to complete the circuit.
When a human gets electrocuted they are in contact with the ground and the electricity is seeking the path to the ground in the quickest way.
The body is a quick path to the ground and your body conducts electricity.
If the bird were on the ground and made contact with the live hot wire then they would also be electrocuted.
But because they are up on the wire and off the ground the bird is safe from electrocution.