Short answer: Only the doctor that performed the surgery can recommend an answer. On average, 1 to 2 months.
Getting a long-handled shoe-horn and shoes without laces after you had a hip replacement is the best safest bet. Sometimes even a minor position can be painful, or you might not even be allowed to bend over to put your shoes on right away.
So this is an indispensable device to help you accomplish the task. Probably some elastic shoelaces to put in your shoes if you want shoelaces.
The elastic is stretchy. It’s hard to get down to tie your shoes, and this works well for someone who has a problem with finger dexterity also. Velcro shoes also are acceptable.
No matter what, the process will be different for everyone. Here is a short video explaining more.