Good hygiene after intercourse is also important. During intercourse, bacteria from the vagina or from the man's penis can enter the urethra. Cleansing the genital area after having sex helps prevent this. Urinating after intercourse helps to flush bacteria out of the bladder and urethra before they can build up and cause an infection. This is most helpful when the quantity of urine is large enough to create a good stream to wash out the bladder.
Smoking tobacco increases the risk of some urinary tract conditions.
Tobacco smoking is also associated with atherosclerosis, including the blood vessels, that go to the kidney. This can cause high blood pressure and loss of kidney function. Smoking tends to cause chronic coughing, which can add to problems with bladder control. The best thing is not to start smoking in the first place. If you do smoke, quit.