Interestingly, a famous work of late medieval literature has this as a starting premise. Giovanni Boccaccio's The Decameron, which was written in the mid-14th century, is a collection of 100 stories structured around a background narrative. Namely, ten young people from wealthy families leave Florence in a bid to escape the plague, and they're stuck in a remote house off in the country twiddling their thumbs for a few weeks. There isn't a lot to do -- and their servants are doing all the real work anyway -- so they're bored to tears. They hit upon the idea of telling stories in the evenings so they have something to occupy their minds while waiting for the plague to die down elsewhere. One of the characters, Dioneo, is thought to be an authorial self-insertion, and is kind of a smartass who's given the most latitude for story topics because he's so awesome. Boccaccio describes him as "a gallant who had not his match for courtesy and wit." Unfortunately, even the Middle Ages didn't manage to escape the scourge of the Mary Sue.
The book is a valuable window into the stories, values, and social conventions of the time. For medievalists in training, it tends to be among the most memorable texts they read, for the simple reason that a lot of it is just really funny. My personal favorite is Filostrato's story on the third day, which is about a guy who pretends to be a deaf-mute in order to get a job chopping wood and doing the gardening at a nunnery. I'm not sure whether I should spoiler alert something that's been around for more than 600 years, but do you know that story that occasionally pops up on Reddit about a male guinea pig who broke into a female guinea pig enclosure overnight?
Anyway, Boccaccio started writing The Decameron at some point during or after the plague's single biggest outbreak in 1348-1351. His home, Florence, was among the first major cities in Europe to be struck, and it lost more than half its population. Florence had the unfortunate luck to be within a day's travel of Pisa, which was probably the major port of entry for at least one of the plague variants that circulated in Europe. (NB: There's still no universally agreed-upon timeline of when or where the plague first reached Europe. I think there's a rough consensus that Marseilles got hit first, but scientists and historians still don't agree on whether a single variant of the plague was circulating, multiple variants were circulating, or whether it was even bubonic plague at all. The speed of transmission is actually more consistent with a viral outbreak.) Even if you're not interested in the stories of the Decameron, you may want to give the first section a read, which contains a stomach-curdling account of what the disease did to the city, and the rapidity and horror with which it killed:
As consecrated ground there was not in extent sufficient to provide tombs for the vast multitude of corpses which day and night, and almost every hour, were brought in eager haste to the churches for interment, least of all, if ancient custom were to be observed and a separate resting-place assigned to each, they dug, for each graveyard, as soon as it was full, a huge trench, in which they laid the corpses as they arrived by hundreds at a time, piling them up as merchandise is stowed in the hold of a ship, tier upon tier, each covered with a little earth, until the trench would hold no more ... How many brave men, how many fair ladies, how many gallant youths, whom any physician, were he Galen, Hippocrates, or Æsculapius himself, would have pronounced in the soundest of health, broke fast with their kinsfolk, comrades and friends in the morning, and when evening came, supped with their forefathers in the other world!
The framing event that Boccaccio uses to structure the story -- people fleeing stricken cities in favor of isolated places elsewhere -- was common for people of means. Basically, anyone who had the money and the freedom to travel got the hell out of Dodge, typically to properties owned by family or friends in the countryside. This wasn't enough to save them if they or someone traveling with them had already been exposed, but it did vastly decrease their risk of infection. The mechanic by which the plague spread wasn't really understood at the time, and it was most typically blamed on the "bad" or "infested" air of the cities. As medieval cities were (at least by modern standards) filthy places even at the best of times, it wasn't hard to believe that the miasma wafting from tens of thousands of people and animals and cook fires in close quarters was the reason for the sickness. In a way, they might even have been right -- it's possible, given how quickly the disease spread, that there was a variant of the plague carried on moisture droplets from peoples' coughs and sneezes -- but this also led to protective measures like holding flowers or perfumed cloths against your nose that obviously didn't work at all.
Boccaccio indirectly suggests that a certain instinct for self-preservation was necessary too. The disease killed so many people so quickly that many Florentines gave in to nihilism and did whatever they wanted while they waited to contract the illness themselves.
The plague wasn't my focus and it's been a while since I read the full Decameron, so I'll stop there. But as a cute bit of trivia, if the idea of a set of stories told by different people on a trip sounds familiar, it's because The Decameron almost certainly gave Geoffrey Chaucer the idea for what became The Canterbury Tales.