I bent down and something clicked in my groin area. Have had pain in upper leg for a week. Sometimes I cannot straighten the leg and at other times I have no pain and leg is ok.
Your age? You've never had any issues with your hip or groin before?
We all have creaks and groans periodically, but if this isn't much improved within two weeks, you should see someone.
Meantime, just be more careful with bending etc. I wouldn't go for long walks, jog at present.
Lying on your back, pull the other knee to your chest, then to the opposite shoulder, then rotate the hip, to establish what's normal.
Now repeat with the naughty leg. Is there any significant difference? Where?
No back pain?
Depending on your age, and general health, I'm thinking of one of the hip conditions like Femoro Acetabular Impingement Syndrome
or arthritis, but you understand that's just a long shot.
If the pain and disability continues, an xray of the pelvis is in order.
I hope this has contributed.