A Google Ngram shows a rise in sexually transmitted disease over venereal disease starting in the mid-1970s, starting in medical and public health circles and gradually becoming mainstream by the 1990s. Venereal disease remains the most common term in print, but it may be displaced before too long.
Historically, gonorrhea and syphilis were the most prevalent, and considered the only diseases transmitted through sexual contact. The 1873 Smith's Family Physician flatly defines venereal disease as these two and none other. But by the 1970s, other conditions and infections such as HPV, genital herpes, and hepatitis C were growing in concern. A 1981 paper in The American Journal of Nursing entitled "VD to STD: Redefining Venereal Disease," did not invent the term STD, but did declare venereal disease obsolete, as it was too restrictive.
Some of these were conditions were not only not traditional venereal diseases, but they could also be spread by non-sexual mechanisms. Some, such as HIV/AIDS required different public health approaches. Venereal could also be seen as a needless euphemism, with sexually transmitted disease being more clinical. So in the U.S., not only did middle school health class change its jargon, but names of some government offices and terminology of some public health laws adopted the new terminology in the mid- to late 1980s. (VD does persist.)
The UN notes that
STD and STI may be thought of as modern terms for "venereal disease" (VD), a term initially used to refer to syphilis and gonorrhoea, which were once thought to be a single disease. The term "venereal" emphasizes the part played by sex in the spread of diseases that would not otherwise be considered as a single group. …
N.B. Although one might think that there are two distinct terms here -- STI for infections and STD for diseases -- the two seem to be used interchangeably, and without particular attention being paid to whether the focus is on infection or disease.
The World Health Organization's International Classification of Diseases 10th revision (ICD10), adopted in 1994, reflects the shift. What in ICD9 was Syphilis And Other Venereal Diseases has been redesignated in ICD10 as Infections with a predominantly sexual mode of transmission (though it explicitly excludes HIV and some other conditions).
But as noted, venereal disease is arguably the most widely understood term, especially among older generations.My generation was taught in health class (early 1990s California) to say sexually transmitted disease, but we still understood the Friends episode how VD was a bad thing to be associated with.