Using a condom during sex is a great way to protect yourself from STIs.
You are right however that with skin to skin contact there is always a risk of getting infections that are transmitted this way.
Getting genital herpes or syphilis is often more complicated than just having direct skin to skin contact as it involves many different factors like at what stage of the infection the person is at who has the infection (do they even have an infection or are they currently having an outbreak or sores), the immunity of the person who may get the infection (are they already immune, are they healthy, are they immunocompromised), the time, timing and nature of the contact… to name some examples.
If you are sexually active, it’s always a good idea to get tested. If you have symptoms you should get tested right away, and if you do not have symptoms you should get tested routinely at least every 3-4 months or so if you have new or different partners.
More information about “my chances” can be found here: https://smartsexresource.com/about-stis/my-chances