Aline...
Before surgery the muscles were holding the old position. The pressure from surgery adding new joint implant components and new positioning of the whole joint and areas surrounding, all has a impact on the joint. It takes months to build up strength. I have had three THR over the years and each recovery was different.
To heal from surgery on average takes almost a full year or more for complete recovery, take necessary precautions. Walking is the best treatment and slowly build up strength and tolerance. Muscle memory is starting over with new components as the brain and body adjust and use the new joint components.
Of course the goal of THR is mobility and hips heal quite well on their own. Slowly just walking no special exercises in my case over time helped by increasing stability and endurance. I used a massager, heat, ice, magnesium sprays, and OTC pain patches. The pain patch is a great healing tool especially for sleep at night. Also very important to eat well, rest daily, take vitamins and protein shakes helped me build up energy, strength and endurance.
sending healing blessing your way.