The 19th was incredibly puritan and tightened the screws somewhat, but it's also the century of the grandes horizontales, high-class courtesans, and it was still "normal", if not almost mandatory, for bourgeoisie men to visit brothels at least once (not to speak of the, ahem, freer customs in the countryside). If you married young, it might just be because a kid was actually on the way; personal experience here, but that's why my grandparents got married on both sides of the family).
What has changed is mostly ease of contact (when you sleep with someone in a random place, you have a good chance to see them again if you want to/you don't have to wait days for an answer with a long-distance relationship), the risks associated with a relationship (whether kids or societal scorn, though the risk was mostly for women) and public discourse around it all: before, state-approved discourse and media, from books to songs, extolled the virtue of pure, sincere love while now, discourse around love and sex is far more "agnostic", for lack of a better word.
If you haven't already indulged, I do recommend "The Great" https://www.imdb.com/title/tt2235759/
I don't think 'agnostic' is the term: modern discourse is pretty strongly on the side of complete and total libertinism. The idea of chastity is considered laughably impossible by the vast majority of media voices. The western world even has an entire month of the year dedicated to being proud of sexual adventurism.
'Agnostic' is way to anodyne to describe the modern world's view of sexuality IMHO.
Not sure if the world is a worse or better place. Something gained, but something lost too.