The most effective way to prevent contracting a sexually transmitted disease (STD) is abstinence. While using contraception (such as condoms) can significantly reduce the risk of transmitting or contracting STDs, they are not 100% effective. Abstinence, or refraining from sexual activity, eliminates the risk of transmission altogether.
Washing hands and bathing are important for general hygiene but do not prevent STDs, as these infections are primarily transmitted through sexual contact.