Yes. You can get syphilis from a single sexual encounter, although transmission does not happen every time. Syphilis can spread through direct contact with a syphilis sore during vaginal, anal, or oral sex. Sores may be painless and difficult to notice. CDC: About Syphilis
What should I do if my partner has syphilis?
Contact a healthcare professional or sexual health clinic promptly. Tell them when the sexual contact occurred and whether your partner has a confirmed diagnosis. Do not wait for symptoms before seeking advice.
Testing is important, but treatment may be recommended even if your test is negative. CDC guidance recommends presumptive treatment for people who had sexual contact within the 90 days before a partner’s diagnosis of primary, secondary, or early latent syphilis. A clinician can determine whether this applies to your situation. CDC treatment guidelines
Does using a condom remove the risk?
Condoms reduce the risk when they cover the affected area, but sores outside the covered area can still transmit syphilis.

