pregnant std testing

i’m 24 weeks pregnant and walked in on my child’s father in the bed with another women. i’m wondering how long it has gone on and now looking into getting tested for stds. who do i go to? primary care physician or my obgyn that i go to for prenatal visits