Try laying on your back on the floor. Straighten your leg out , then pull your knee up to your chest with your foot flat on the floor then straighten it out. Repeat several times. Then , laying on the floor, swing your leg side to side with your heel barely clearing the floor. Repeat several times. What you are trying to do is gently move the joint in many directions. It will hurt like hell at first and then start to feel better. I do this when my hip hurts. I think the movement gets out stuff that builds up. I am 62 BTW.
That’s what you do to re-align the sacro-iliac joint. OP, go to the doctor, get checked out, he/she may suggest physical therapy. DO IT! I had shooting pains in my hip and down my leg. Turned out it was a shifted Sacro-Iliac joint that pinched on a nerve. I got massage, heat, cold, and electrical stimulus along with stretching and mild exercise. I suffered with that garbage for 11 years and now that I know the stretches and exercises, I’ve only had one flareup in over 10 years.
Or it could be bone cancer that my Mother died from. Go see the dang doctor.