The femur can be broken down into three parts—the ball at its head, the body that is the long shaft, and the neck that connects the body to the head. The femur bone angles out from the knee to the outside of the pelvis before it turns in via the neck so the femoral head can sit in the hip socket.
Good posture and walking patterns are highly dependent on the alignment of the femoral head which has a specific placement within the acetabulum. If your iliofemoral ligament is well toned and situated, it helps to screw the femoral head into the socket.
I am always seeking the simplest image to share with people to help to better understand posture. Screw the femoral head into its socket is one that works well for me. The hip joint is a ball and socket joint with a great deal of possible movement. In the same way that the ligaments of the sacroiliac joints are super strong to limit their movements the same goes for the iliofemoral ligament. The iliofemoral ligament actually twists in the way it attaches (it untwists when the leg lifts or moves forward twisted) so screw in the femoral head into its socket is a fairly literal image.
My main take on posture is that most people have overstretched iliofemoral ligaments and have femoral heads that are unscrewed partway out of the acetabulum. To me this is the cause of most issues with the labrum, a ring of cartilage that surrounds the acetabulum and has somehow become the most popular surgical repair of the moment.
Beware the phrase– labral tear. No good can come from hearing it come out of an orthopedists mouth.
I think everyone tucks their pelvis and forces the thigh bones forward of the hips. This unscrews the femoral head and taking the thighs back to untuck the pelvis and relax your butt will screw them back in correctly.
I think there is a place where you should feel the femur heads screwed correctly into their sockets. Find that place and live there for the rest of your life.