UTI treatment

How long after UTI treatment should I wait to have sex? Not asking in terms of birth control, we are covered. I mean as far as the infection goes- how long do I wait so it doesnt come back? After the pain is gone? Done with antibiotics?

Doctor said Im good to go after done with antibiotics.