I see not reason
The ultrasound is used to see if there is a reason for repeat infections e.g. Stones, tumors, blockages of flow for some reason. So doing it should be sooner than later. But you should wait until the infection proves recurrent i.E returns after treatment in females. In male patients, ultrasound is done earlier d/t infection is unusual in men.