Beginners are often discouraged by the seemingly endless number of bar chords listed in teaching material. However, the facts are much less discouraging.
Only four fingering positions are needed to play every Major and Minor chord on the guitar:
Note the two fingerings for Bar-A, that on the left best for acoustic and wide-necked instruments, that on the right better for electric and narrow-necked ones.
Here are some examples of how to use them:
And here are the chords formed by placing the bar on the fret numbers shown: