Completely up to you
A hip replacement
is necessary only when the pain or lack of motion gets to the point that you aren't able to make the necessary accommodations to live with it.
However, another thing to consider is your current overall health and activity level. Avoiding surgery now may be preventing you from being more active. Ultimately, you are the best judge of when you are ready.