First of all I want to say congratulations on your decision to learn guitar. As you have already discovered, it is not an easy instrument to master - but once things begin to come together and you start learning to change from chord to chord and play songs, it is very rewarding. And since there is always room for improvement no matter how good you become, it's a lifelong journey of continuing improvement and sense of accomplishment.
Learning the guitar takes patience, desire, and determination. Learning to play your first chords is probably the most challenging part of learning guitar. You must train your brain to tell your fingers and hands and wrist how to contort into very un-natural shapes and positions that you have never had to do before.
This process is tedious and takes repetitive practice. It would be immensely valuable to have an experienced guitarist or teacher show you the correct hand and finger positions for each chord and perhaps tell you what you might be doing wrong.
There are probably some decent self study courses that show some hand/finger positions, but it's not always easy to translate what you see in a picture or video, to the perspective of your eyes looking at your hand from the opposite angle you are watching on the video.
Please understand that the difficulty you are experiencing getting all the notes in your chords to sound clearly - is something that every beginning guitar student experiences and is perfectly normal. It takes hours of practice using the correct and proper hand and finger position to learn to form each chord. Once you figure out exactly what to do with your hand and fingers to get a clean sounding chord, you must practice forming and releasing the chord over and over until your brain memorizes the shape and it becomes almost natural.
Then you learn another chord in the same key and practice switching back and forth between those two chords. If you are teaching yourself, start by learning the I, IV and V chords of a key that is easy on guitar. This could be C, F and G in the key of C or G, C and D in the key of G or D, G and A in the key of D. All of the aforementioned chords can be played as open chords (no barre chords).
Once you learn the I, IV and V chord for a particular key, there will be thousands of songs you can play using just those chords. Keep adding new chords to your arsenal as you progress. For example add the ii minor and vi minor in the key to allow you to play thousands of more songs.
One thing you need to be sure is happening as you try to play the chords, is that your fretting fingers must be perpendicular (at a right angle) to the fretboard (or as close to perpendicular as you can get). Otherwise your finger will touch an adjacent string and muffle it. In order to press down the string while your finger is perpendicular to the fretboard, you will need to have your fingernails trimmed closely so that the fingernail does not extend past the fingertip.
Don't place your fingers directly on the fret but rather slightly behind the fret or in between the frets. Different chords will require you to place your fingers in different places relative to the frets, but never place your finger directly on the fret.
Each chord formation will necessitate a slight shift in your thumb position and orientation on the back of the neck. Most chords can be played with the thumb near the center of the back of the neck but some will be easier with your thumb higher or lower than centered. And some chords will be most easily played with your thumb perpendicular to the neck while others will be easier to play with your thumb more parallel to the neck.
Also, your wrist position and orientation will change for each chord. If you don't have a friend who plays guitar to help you with the correct hand and finger positions or don't have access to a teacher, feel free to play around with different ways of holding your wrist and different thumb positions (and orientations) until you find something that works for the chord you are trying to play.
Each chord is completely different in many ways and you simply must accept that it is going to take time to learn the proper fingering and hand position to play each one - and then will take consistent practice and repetition to learn to repeat the formation reliably.
The first step is to learn the proper positioning and fingering to play the chord cleanly. The next exercise is to just form the chord and release it and form it again and release it - repeating this process until you can form it relatively quickly. Then you will repeat this process for another chord in the same key.
Take each chord one at a time until you learn two, then practice transitioning back and forth between those two. Then add a third chord in the same key and practice transitioning in all the possible ways between the three chords (I, IV and V chord recommended for maximum use in more songs).
Then find a song that you would enjoy learning to play that uses only those three chords. You can use a capo to transpose to other keys until you learn to play the chords in the other keys. Pick a song with a simple rhythm (strumming pattern) such as a down down down down or down-up down-up down-up down-up etc.
Before long you will be playing a song you like. Then learn another one or two or three. It's more fun to practice your chord changes by learning to play a song than just doing the exercises. But the exercises are necessary in the beginning.
As you build finger strength and callouses it will become easier to play more chords.
Here are some links to other stack exchange answers that will be valuable resources to you as a beginner.
Using a capo to transpose to different keys using your favorite chord shapes
Custom easier to play string set for those just starting to learn guitar
Just remember, the hardest part comes in the very beginning but if you stick with it and understand that it does take dedication and consistent tedious practice, you will soon start making advances very rapidly. If you can just stick with it until you can play a song you enjoy, you will be hooked for life. You can do it! Good luck.