UTI ....

Is is possible to get an uti from not using the bathroom after sex ? 
Went straight to bed afterwards and 2 days later I believe it's an uti . Any suggestions would be greatly appreciated . Thank you