Pulling out, or withdrawal, isn’t an effective method of STI prevention
because most disease-causing microorganisms don’t depend on ejaculation
for transmission. A condom will only help prevent the spread of STIs if
you put it on before sex and leave it on the entire time you are having
sex.
Pre-ejaculate itself doesn't contain sperm, however it may pick up sperm
left in the urethra from a previous ejaculation, and thus, re-inserting
your penis after ejaculation (outside of the vagina) does present a
risk of pregnancy.