The behavior associated with a greater risk of contracting a sexually transmitted infection (STI) is:
having multiple sexual partners for many years
This behavior increases exposure to potential infections, making it more likely to contract an STI.