One of the main issues is contracting the muscles which control the fingers incorrectly - the muscles needed are the flexors (the muscles which flex the fingers in order to make a fist) BUT we don’t want the extensors (the muscles which extend the fingers, making them straight) to contract at the same time.
When making a fist, the flexors are contracted tightly, but so are the extensors of the wrist, locking a fist in place.
When playing guitar, it is often the case that both flexors and extensors get activated, and we need to learn to let go of the extensors, relaxing the hand in such a way that only the muscles necessary are firing.
a simple exercise is to touch each fingertip in turn against the thumb, something everything is familiar with. it requires no strength, no stretching, just simple coordination.
At first, keep the fingertips loosely together, and you will be able to touch the thumb with each finger really quickly - totally relaxed.
Then spread your fingers out slightly, and repeat the exercise. You’ll notice that spreading the fingers out feels completely different. Smaller muscles in the hand are fired up, as are some of the extensors. When you then touch your thumb, you will just need to relax the finger and bring it towards the thumb - no drama.
Now stretch the fingers out straight and repeat. This time you will notice that when stretching them out, it feels completely different. The muscles being activated are really going for it, and you’ll feel a stretch on the palm side of the fingers.
Now touch the thumb with each finger in turn. Again, you only need to relax the fingers in order to bring them towards the thumb.
You can repeat the above exercises, pressing hard agains the thumb each time - this is what we are aiming for.
Now you have done the exercise, pick up the guitar, and without even worrying about forming chords, just put each finger down on any string and play it. The muscles you use will be different, the hand is in a slightly different shape, but remember the feeling of the above exercise. If the feeling is the same as when you stretched the fingers out straight, you need to learn to relax them, just simply relax the hand completely until you can’t get a note out of the string.
The hand should be pretty limp. Then put on just enough pressure to get the note.
Try forming a chord, following the same rules - you should not have your hand cranked in some weird way or be tensing the entire forearm (where your finger muscles reside) but have the hand as relaxed as possible.
Even if you can’t form a chord comfortably right now, the key is relaxation. a tense hand will cause the issues you have noted (I still do it when forming a new or unfamiliar chord, or moving between unfamiliar chords)
…And as noted in other posts here, do not stretch in such a way that it hurts! Your body will fight back and you can’t win.
Just chill, and don’t stress whether it takes a day, week or a month to get a chord.