IIRC how long it lasts, as well as catching it in the first place, is highly dependent on your characters health stat. Gammaglobulin shots, flue shots, multivitamins, and eating right will all help raise your health stat making you less likely to catch it and making you get better faster if you do. Eating junk food, smoking, drinking alcohol, doing drugs, and some failed bionics installs will all lower it making you more likely to get sick and making it last longer when you do. Neither is an exhaustive list and if you haven’t modded out the vitamin update taking too many multivitamins is also bad.
Remember, your cold doesn’t last that long in real life but you’re also probably not constantly running from zombies eating only what you can scavenge with no central heating and only the clothes you can scrounge or make yourself to stay warm.