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 the likelihood of exposure to STIs, especially if safe practices such as using condoms are not consistently followed.