Thanks for query,
You have not mentioned your age.
If you are elderly then you might have degenerative changes in your spinal vertebrae causing nerve root pain in the leg
or groin area due to irritation of nerves passing through.
Go for X ray
lumbo sacral region.
Ok and bye.