Power chords or 5 chords are just two notes.
Root note plus 5th.
They can be 2-string (root then 5th ascending in pitch) or 3-string (root plus 5th plus another root one octave up) in ascending pitch.
This next part applies to Root 6 and Root 5 power chords.
The lowest pitched note - the root - can be an open string.
The lowest pitched open string is E. Therefore it is lossible to play E5 using the open low E string as the root.
The next open string is A. This can be the root of an A5 power chord.
The other note(s) - whether a 2-string or 3-string version - are two frets along from the root.
Listing the fret numbers with 0 = open …
E5 = 0, 2, 2, x, x, x
A5 = x, 0, 2, 2, x, x
To finger those you could lay index finger down in a mini-barre across the two strings at fret 2 (far and away the most commonly used), use two separate fingers (you choose) at fret 2.
We will not consider Root 4 power chords here. They exist but make things more complicated.
So, allowing for Root 6 and Root 5 power chords only:
There are two possible open position power chords (E5 and A5).
There are multiple options to finger these but a flat mini-barre with 1st finger is the usual.
All other Root 6 and Root 5 power chords involve placing 1st finger on the low root and stretching two frets up with one or more fingers for the other note(s).
There is also a Root 6 A5 at fret 5.
There is also a Root 5 E5 at fret 7 … but this is an octave higher in pitch than the open position E5.
If a song has C5, D5 and A5 you can play using only Root 6 or only Root 5 or a mixture of both.
If a song has E5, B5 and A5 you can play using only Root 6 or only Root 5 or a mixture of both.
If a song has G5, C5 and D5 you can play using only Root 6 or only Root 5 or a mixture of both.
If a song has A5, D5 and E5 you can play using only Root 6 or only Root 5 or a mixture of both.