I’m sorry to hear about your pain symptoms.
There can be many different causes for hip pain ranging from degenerative changes, hip flexor tightness, gluteus medius tendonopathy, hip impingement or a labral tear.
The position you are putting your hip into is similar to the Fabers test position and could be suggestive of a labral injury - quite why you have developed this without any trauma needs further evaluation.
You would probably benefit from an assessment if the symptoms are ongoing - you could see a MSK/Sports Phsycian or physiotherapist who can take a history and examine you. The former can also do an ultrasound for you in the clinic itself. Treatment will depend on the assessment.
Hope this helps.
Bw
Dr Dinesh